Ran a test connection and was able to draw info out, so what has depricated/changed here?
Worked on php4 fine, now won’t on php5?
EDITED>> SEE CODE BELOW.
What error message are you getting?
No error at all. it actually reloads the page with nothing.
ok, the code above is not the code I inserted, it now has [email] in it?
Let me insert it again and see what happens… ?
[php]<?php if (isset($_GET[‘state’])):
$dbcnx = @mysql_connect(‘host’, ‘DB_User’, ‘Password’);
if (!$dbcnx) {
exit(‘
Unable to connect to the database server at this time.
’);}
if (!@mysql_select_db(‘DB_Name’)) {
exit(‘
Unable to connect to the database server at this time.
’);}
$_GET[‘state’] = $state;
$result = @mysql_query(“SELECT * FROM stores WHERE state=’$state’”);
if (!$result) {
exit('
Error performing query: ’ .
mysql_error() . ‘
}
echo(‘Back’);
echo ‘
echo “\n”;
echo “\n”;
// Display all store locations
$count = 4;
$count2 = 1;
while ($row = mysql_fetch_array($result)) {
if($count==4) {
$count=1;
echo “\n”;
echo “
- ”;
- ’ . “\n”;
echo ‘’ . “\n”;
echo ‘’. $row[‘name’] . ‘’ . ‘
’ . “\n”;
if ($row[‘local’] != null) {echo $row[‘local’] . ‘
’ . “\n”;}
if ($row[‘address’] != null) {echo $row[‘address’] . ‘
’ . “\n”;}
echo $row[‘city’] . ", " . $row[‘state’] . “\n”;
echo $row[‘zipcode’] . ‘
’ . “\n”;
if ($row[‘phone’] != null) {echo $row[‘phone’] . ‘
’ . “\n” . ‘
’ . “\n”;}
if ($row[‘url’] != null) {echo ‘’ . $row[‘url’] . ‘’ . “\n”;}
echo ‘’ . “\n”;
echo ‘ ’ . “\n”;
echo “\n”;
}
else {
$count++;
}
echo “\n” . “\n”;
echo ‘
if($count2==4) {
$count2=1;
echo “\n”;
echo “
echo “\n”;
}
else {
$count2++;
}
}
echo “\n” . “\n”;
echo “”;
echo “\n”;
echo “\n”;
echo ‘
?> <?php else: //connect to database $dbcnx = @mysql_connect('host', 'DB_User', 'Password'); if (!$dbcnx) { exit('
Unable to connect to the database server at this time.
'); } if (!@mysql_select_db('DB_name')) { exit('Unable to connect to the database server at this time.
'); } echo('United States of America
" . "\n"); echo('- ' . "\n");
//link to all states
echo '
- Alabama ' . "\n"; echo '
- Alaska ' . "\n"; echo '
- Arizona ' . "\n"; echo '
- Arkansas ' . "\n"; echo '
- California (North) ' . "\n"; echo '
- California (South) ' . "\n"; echo '
- Colorado ' . "\n"; echo '
- Connecticut ' . "\n"; echo '
- Delaware ' . "\n"; echo '
- Florida ' . "\n"; echo '
- Georgia ' . "\n"; echo '
- Hawaii ' . "\n"; echo '
- Idaho ' . "\n"; echo('
- ' . "\n");
echo '
- Illinois ' . "\n"; echo '
- Indiana ' . "\n"; echo '
- Iowa ' . "\n"; echo '
- Kansas ' . "\n"; echo '
- Kentucky ' . "\n"; echo '
- Louisiana ' . "\n"; echo '
- Maine ' . "\n"; echo '
- Maryland ' . "\n"; echo '
- Massachusetts ' . "\n"; echo '
- Michigan ' . "\n"; echo '
- Minnesota ' . "\n"; echo '
- Mississippi ' . "\n"; echo '
- Missouri ' . "\n"; echo('
- ' . "\n");
echo '
- Montana ' . "\n"; echo '
- Nebraska ' . "\n"; echo '
- Nevada ' . "\n"; echo '
- New Hampshire ' . "\n"; echo '
- New Jersey ' . "\n"; echo '
- New Mexico ' . "\n"; echo '
- New York ' . "\n"; echo '
- North Carolina ' . "\n"; echo '
- North Dakota ' . "\n"; echo '
- Ohio ' . "\n"; echo '
- Oklahoma ' . "\n"; echo '
- Oregon ' . "\n"; echo '
- Pennsylvania ' . "\n"; echo('
- ' . "\n");
echo '
- Rhode Island ' . "\n"; echo '
- South Carolina ' . "\n"; echo '
- South Dakota ' . "\n"; echo '
- Tennessee ' . "\n"; echo '
- Texas ' . "\n"; echo '
- Utah ' . "\n"; echo '
- Vermont ' . "\n"; echo '
- Virginia ' . "\n"; echo '
- Washington ' . "\n"; echo '
- Washington D.C. ' . "\n"; echo '
- West Virginia ' . "\n"; echo '
- Wisconsin ' . "\n"; echo '
- Wyoming ' . "\n"; echo('
World
<?php echo('Ok, that’s more like it… above is what it looks like. It auto creates links, so you have to remove them.
ok, popped this in to test:
[php]
if ($result) {
print “YOU HAVE RESULTS”;
}
[/php]
Got back: YOU HAVE RESULTS
I’m completely baffled~~! I even went as far to check the CSS for -1000 positioning, it’s fine.