Philosophaie
02-16-2012, 09:40 PM
I have a heading and a full length sidemenu bar on my HTML page.
There is a problem with the $usern = filter_input(INPUT_POST, "usern"); it will not register from the html code because the echo does not print. I think it may be due to the <div class = "content" id ="content"> but I need the separate css frames. Could someone show me where I am going wrong?
<div class = "content" id ="content">
<form name = "myform" action="index.php" method="post">
<fieldset><left><table><tr><td align = "left"><h2>Username</h2></td></tr>
<tr><td align = "left"><input type="text" name="usern" value="myuser" size="8"/></td></tr>
<tr><td align = "left"><h2>Password</h2></td></tr>
<tr><td align = "left"><input type="text" name="passw" value="mypass" size="8"/></td></tr>
<tr><td align = "left"><input type = "submit" name = "signin" value="Sign In" /></td></tr>
<tr><td align="left"><h2>Count</h2></td></tr>
<tr><td align="left"><input type="text" name="count" value="count#" size="8"/></td></tr></table></left></fieldset>
</form>
</div>
<?php
$usern = filter_input(INPUT_POST, "usern");
$passw = filter_input(INPUT_POST, "passw");
$count = filter_input(INPUT_POST, "count");
echo $usern;
//php screen is blank. It does not echo. It did not reach connection.
$host = 'localhost';
$user = 'username1';
$pass = 'password1';
$db = 'database1';
$link = mysql_connect($host, $user, $pass) or die('Could not connect: ' . mysql_error());
echo "Connection Made";
...
?>
There is a problem with the $usern = filter_input(INPUT_POST, "usern"); it will not register from the html code because the echo does not print. I think it may be due to the <div class = "content" id ="content"> but I need the separate css frames. Could someone show me where I am going wrong?
<div class = "content" id ="content">
<form name = "myform" action="index.php" method="post">
<fieldset><left><table><tr><td align = "left"><h2>Username</h2></td></tr>
<tr><td align = "left"><input type="text" name="usern" value="myuser" size="8"/></td></tr>
<tr><td align = "left"><h2>Password</h2></td></tr>
<tr><td align = "left"><input type="text" name="passw" value="mypass" size="8"/></td></tr>
<tr><td align = "left"><input type = "submit" name = "signin" value="Sign In" /></td></tr>
<tr><td align="left"><h2>Count</h2></td></tr>
<tr><td align="left"><input type="text" name="count" value="count#" size="8"/></td></tr></table></left></fieldset>
</form>
</div>
<?php
$usern = filter_input(INPUT_POST, "usern");
$passw = filter_input(INPUT_POST, "passw");
$count = filter_input(INPUT_POST, "count");
echo $usern;
//php screen is blank. It does not echo. It did not reach connection.
$host = 'localhost';
$user = 'username1';
$pass = 'password1';
$db = 'database1';
$link = mysql_connect($host, $user, $pass) or die('Could not connect: ' . mysql_error());
echo "Connection Made";
...
?>