View Full Version : php not reading html code

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>

$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";

02-16-2012, 11:42 PM
Does the "connection made" message show up?

02-17-2012, 12:03 AM
"Connections Made" is not there. Neither does the error report. My username and password work in other programs.

02-17-2012, 12:07 AM
What version of PHP are you using?

02-17-2012, 12:40 AM

02-17-2012, 02:22 AM
Hmm. 5.3.8 is certainly sufficient for filter family functions. Enable your error reporting with:

ini_set('display_errors', 1);

Does that indicate a problem?
Count itself won't exist since the html for the submit is before the count input.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum