Jump to content

newb seeks knowledge

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
wolfgar

wolfgar

    Newbie

  • Members
  • Pip
  • 8 posts
how do you get the var or what ever the thing is from a url extension like ".php?ID=87643&name=john" they look like it'd just be another $var but when i tried it didnt work , and i haven't seen any tutorial info that has it ( unless i missed it some how >< )

could some 1 give me an example of how it works plz?

#2
brokenbylaw

brokenbylaw

    Learning Programmer

  • Members
  • PipPipPip
  • 62 posts
i expect you to have some html knowledge right?

in html there is GET and POST. get is the ?ID=65678 and post is more on the backend side
<form action=".php" method="GET">
<input type="text" name="ID">
<input type="submit" name="button">
</form>
will send .php?ID=

in php to get that you can use $_GET[] and $_POST[]

<?php
$ID = $_GET['ID'];
echo $ID;
?>
this will take the value and print it to the screen.

#3
wolfgar

wolfgar

    Newbie

  • Members
  • Pip
  • 8 posts
ok , thats easy enough
thanks for the help