Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- POST not working.
- IRM Calendar
June 4, 2010, 3:44 pm
rate this thread
I am trying to do what should be a simple task.
I have this form in my PHP page:
<form method="post" action="blog.php">
<p>Choose a username:
<input type="text" name="username" /></p>
<p><input type="submit" name="Submit" value="Log in">
blog.php has this code:
$username = $_POST['username'];
<h1>Welcome <?= $_POST['username'] ?> </h1>
Yet the username does not show up on the blog page when I run it.
Can somebody tell me why? Thanks.
Re: POST not working.
IRM Calendar wrote:
You probably don't have short_open_tags enabled (it shouldn't be).
Try <?php echo $_POST['username']; ?>
Of course, you should also ensure that $_POST['username'] is properly set.
Remove the "x" from my email address
JDS Computer Training Corp.