PHP Code Help!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Cesar
Forum Commoner
Posts: 31
Joined: Sat May 22, 2004 1:35 am

PHP Code Help!

Post by Cesar »

I have a code b/m

<form>
<input type=text name="username">
<input type=submit value="submit">
</form>

<?php
echo($username);
?>

After submit varieble username is empty.
Whats a problem?
User avatar
doggy
Forum Commoner
Posts: 80
Joined: Tue Dec 09, 2003 5:01 am
Location: South Africa

Post by doggy »

<form>
<input type=text name="username">
<input type=submit value="submit">
</form>
<?php
$username = $_POST['username'];
echo "$username";
?>
You must get the values from post.
You should find some where to read up about $_GET 7 $_POST.
Hope this helps
Cesar
Forum Commoner
Posts: 31
Joined: Sat May 22, 2004 1:35 am

Thank You

Post by Cesar »

All right
Thank You
Post Reply