What's wrong with this picture????!!

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

What's wrong with this picture????!!

Postby timstring » 09. January 2012 19:35

I've created a database and when I try to write a query, I'm getting the Die phrase. The script isn't returning an error when it connects to the database. When I run the query in Sequel Pro, it is returning the correct information. Any ideas?

Here's the code:

echo "<p>everything is beautiful</p>";
echo "Gigem aggies";
$Dbname = "Digital Rails";
$cxn = mysql_connect($host,$user,$password,$dbname)
or die ("couldn’t connect to server");
mysql_select_db("Rails", $cxn);

echo "<p>" . $_POST["Display_Entry"] . "</p>";
$posted = $_POST["Display_Entry"];

echo $posted;

$query = "SELECT * FROM Rails WHERE Display=$posted";

$result = mysql_query($query)
or die ("<p>Couldn’t execute query.</p>") . mysql_error();
while($row = mysql_fetch_array($result));
echo $row['Eia'] . " " . $row['Freq'] . " " . $row['Station'];
echo "<br />";

"If builders built buildings the way that programmers write programs, the first woodpecker to come along would destroy civilization."
User avatar
Posts: 22
Joined: 17. September 2010 02:16

Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 7 guests