Page 2 of 2
Posted: Thu Nov 09, 2006 5:16 pm
by RobertGonzalez
add this to the beginning of your script:
Code: Select all
<?php
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
?>
This will show not critical errors in the code. If the page is still blank then it is a syntax issue (unclosed bracket, missing semi-colon, etc).
Posted: Thu Nov 09, 2006 5:31 pm
by JimiH
Yes must be something missing the page is still blank!
I recreated the basic problem at home so the tables and fields are different until I get back to work.
Code: Select all
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
echo $TAB1FIELD3 ;
echo"<select name=\"TAB1FIELD3\">";
while($row=mysql_fetch_assoc($my_query))
{
$selected = ( $TAB1FIELD3 == $row['TAB2FIELD2'] ) ? ' selected="selected"' : '';
echo '<option value="'.$row['TAB2FIELD2'].'"' . $selected .
//echo "<option value=\"".$row['TAB2FIELD2']."\">".$row['TAB2FIELD2']."</option>";
}
I'll have a look and see whats missing
Thanks
Geoff
Posted: Thu Nov 09, 2006 5:57 pm
by RobertGonzalez
You're missing a semicolon
Code: Select all
<?php
while($row=mysql_fetch_assoc($my_query))
{
$selected = ( $TAB1FIELD3 == $row['TAB2FIELD2'] ) ? ' selected="selected"' : '';
// ON THE BELOW LINE ADD A SEMICOLON
echo '<option value="'.$row['TAB2FIELD2'].'"' . $selected .
}
?>
Posted: Fri Nov 10, 2006 5:35 am
by JimiH
Hi
This is strange I pasted your original code at work & it worked first time
I must have different versions of PHP or something.
anyway it works, thank you very much for your help.
Geoff
Posted: Fri Nov 10, 2006 8:32 am
by RobertGonzalez
Your welcome. Post back if you have any other troubles.