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!
<?php
session_start();
$user = $_POST['username'];
echo "need to enter a value into the textbox";
$_session['User'];
print "<a href='New/index.php'>Continue</a><br>";
?>
<html>
<head>
<title>localhost/index</title>
</head>
<body>
<INPUT TYPE = "text" Name = "username" value = "">
</body>
</html>
it echo out this:
Continue
"; ?> //and the textbox
Last edited by Goofan on Thu Apr 15, 2010 2:55 pm, edited 1 time in total.
your code works for me without changes.... I can reproduce your error using short tags (in my case), hence my suggestion.... also.. this lkine caught my attention
Goofan:
The reason it's messing up is that you're echoing out "need to enter a value into the textbox" and the link code BEFORE the <html> start tag. So try something like this, instead:
<?php
session_start();
$display = '';
$user = $_POST['username'];
$display .= "need to enter a value into the textbox";
$_session['User'];
$display .= "<a href='New/index.php'>Continue</a><br>";
?>
<html>
<head>
<title>localhost/index</title>
</head>
<body>
<?php echo $display; ?>
<INPUT TYPE = "text" Name = "username" value = "">
</body>
</html>