Jump to content

[SOLVED] PHP Select Not Working..


monkeypaw201

Recommended Posts

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);
?>

Link to comment
https://forums.phpfreaks.com/topic/103655-solved-php-select-not-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.