Jump to content

Recommended Posts

You guys are great, thanks again for the help last week.

 

Now I almost got this working but a small hiccup.

 

here is my code:


<?php 
include("config.php");
$my_t=getdate(date("U"));
$my_t1=$my_t[weekday];
$result = mysql_query("SELECT * FROM tourney where day_of_week = '$my_t1'") or die(mysql_error()); 
if ($result == '') echo "<br>Empty Set\n";
print_r ($my_t1);

This prints correctly

 

while ($result = mysql_fetch_array($result,MYSQL_ASSOC)) {

This is my error. "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /hermes/bosweb/web017/b172/ipg.dswdesignsnet/pp4c/charity1.php on line 8"

 

print "<b>Starting Time: <br></b>".$row{'start_time'}."<br><b>Tournament: </b><br>".$row{'tourney'}."<br><b>Buy-in: <br>".$row{'buy_in'}."<br><b>Starting Chips: <br>".$row{'start_chips'}."</font><p>";

This prints headers correctly, but no variables.

 

}
mysql_close($dbh);
?>

 

What did I forget to do or what did I do wrong.

 

I'm still learning mysql and php.

Link to comment
https://forums.phpfreaks.com/topic/235338-pass-variable-from-php-to-mysql/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.