OK I admit I'm not an expert!
I'm a code tweaker rather than a code writer.
I used "mysql_pconnect" just because I've used it before and it worked!
The "proof" was when I didn't get an error message, didn't die, and the rest of the page loaded. Don't know what proof I need to post here?
So what was the result you got? If you only tell us half the story, it's really difficult to help.
The result was I didn't get an error message, didn't die, and the rest of the page loaded. I really don't know what else to say.
On the previous page is a form where I enter a first name in one dropdown, and a last name in another dropdown.
If the name (together) isn't in the database, I want to say
Code: Select all
echo "This player was not found in the Database: $homeplayer1_fname $homeplayer1_lname"; die; }
This is the latest I've tried, with some code after the problem code to hopefully show what I'm trying to achieve.
Code: Select all
mysql_connect("x","y","z");
mysql_select_db("w");
$query = "SELECT * FROM demo_players WHERE F_Name='$homeplayer1_fname' AND L_Name='$homeplayer1_lname'";
$result = mysql_query($query);
if (!$result)
{
echo mysql_error()."<br>$query"; die; }
?>
</font>
<?
echo "$homeplayer1_fname $homeplayer1_lname v $awayplayer1_fname $awayplayer1_lname : "?>
<select name="set1">
<? if ( $homeplayer1_lname == "NoPlayer" ) {
echo ?>
<option value="W-0">W-0</option>
<option value="0-W">0-W</option>
<option value="0-0">0-0</option>
</select><? ;
}
This prints the (incorrect) player name.
Not sure what a "command window" is, but it sounds useful.