twixter Posted February 3, 2008 Share Posted February 3, 2008 Hi, PHP noob here. Got this site which was working before. when it was migrated to a different server, all the scripts never worked anymore. add, delete, edit, etc. so i got back to zero. after days of working on different scripts, got the others working out already. however, for this code, it doesn't. it's supposed to display the information in view.php but it just gives me a blank page. stumped here. help please and thanks in advance. <?php include ('connect.php'); include ('lb.php'); mysql_select_db("dbname"); $query = "SELECT * FROM maintable WHERE title='statement' AND issue='television' ORDER BY date DESC"; $result = mysql_db_query("dbname", $query); if ($result) { echo "<center><font face=arial><b> Statements: Television</b><br><TABLE BORDER=0 cellpadding=5>"; echo"<TR><TD> </B><TD> <TD> </TR>"; while ($r = mysql_fetch_array($result)) { $id = $r["id"]; $issue = $r["issue"]; $date = $r["date"]; $time = $r["time"]; $title = $r["title"]; echo "<TR><TD> $date </td><TD> <a href=\"view.php?id=$id&issue=$issue&date=$date&time=$time&title=$title\">$title</a> </td></tr>"; } echo "</table></font></center>"; } else { echo "No data."; } ?> and this is the view.php file: <html> <?php include ('connect.php');?> <?php include ('lb.php');?> <br> <center><table width=80% border=0 id=tablecontent cellpadding=5> <tr> <td valign=top width=150 cellpadding=5><center><b><?php echo "$issue";?></b></center></td> </tr> <tr><td><p align="right"><i><?php echo "$date";?></i></p></td></tr> <tr><td valign=top> <?php echo "$time";?> / <?php echo "$title";?><br><br> </td> </td></tr> </table></center></font> <br /> <font face=arial><center><a href="#top">Back to top</a></center></font> </html> Quote Link to comment Share on other sites More sharing options...
ratcateme Posted February 3, 2008 Share Posted February 3, 2008 so you get a blank page not even a "No data." message Scott. Quote Link to comment Share on other sites More sharing options...
twixter Posted February 3, 2008 Author Share Posted February 3, 2008 so you get a blank page not even a "No data." message Scott. Just getting a blank page. I tried <?php echo $_REQUEST["title"] ;?> on my view.php file. it worked. am i doing the right thing? thanks! Quote Link to comment Share on other sites More sharing options...
ratcateme Posted February 3, 2008 Share Posted February 3, 2008 year sorry i see what you are doing now you need to change <?php echo "$date";?> to <?=$_GET["date"]?> and repeat for the rest i think i no what happed when you switched servers you had register_globals on with your old server and when you switched it was turned off this stuffed all your scripts you could try turning it on and see what happens Scott. Quote Link to comment Share on other sites More sharing options...
twixter Posted February 5, 2008 Author Share Posted February 5, 2008 Thank you again for your reply. you've been most helpful. i'll try to switch off globals. Quote Link to comment Share on other sites More sharing options...
revraz Posted February 5, 2008 Share Posted February 5, 2008 You want to leave them off and fix all your variables instead. Quote Link to comment Share on other sites More sharing options...
twixter Posted February 5, 2008 Author Share Posted February 5, 2008 ic. turning on register_globals is a different issue now. not sure if i can mess with the .htaccess, it has a script for password protection. will have to work the long way instead. thanks revraz Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.