monkeypaw201 Posted May 1, 2008 Share Posted May 1, 2008 i have this: <?php $con = mysql_connect("localhost","root","rootpwd"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("pool_web", $con); $result1 = mysql_query("SELECT * FROM program WHERE day = 'sunday'"); $row_sunday = mysql_fetch_array($result1) ?> some html... and then: <input name="filter_start" type="text" id="filter_start" value="<?php echo $row_sunday['filter_start'] ?>" size="7" maxlength="5"> which outputs: 00:00 and the database field is empty... and if i enter in the database 01:00 it still doesn't change.. oh right... the last bit of PHP on that page <?php mysql_close($con); ?> Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted May 1, 2008 Share Posted May 1, 2008 Does your query return more than one row? If so, you are only getting the first row returned from the result set. Quote Link to comment Share on other sites More sharing options...
monkeypaw201 Posted May 1, 2008 Author Share Posted May 1, 2008 nope, only 1 row.. Quote Link to comment Share on other sites More sharing options...
monkeypaw201 Posted May 1, 2008 Author Share Posted May 1, 2008 turns out it doesn't like it when you name the input field the same as the variable row.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.