Corey Cormack Corey Cormack - 1 year ago 62
PHP Question

How to debug a PHP/HTML page that is resulting in a white screen?

I am having issues with a PHP page I'm working on.

I have a list.php which is recalling data from a MySQL database, a config.php as a connection page to my db. Below is my edit.php page and when I view it, it's completely blank. Where is my code gone wrong?

URL string http://localhost/example/edit.php?id=382 (which should be recalling the client id of 382 to edit)`

$query3=mysqli_query("update restrictedkeys set Name='$name', Address='$address' where cx_id='$id'");
$query1=mysqli_query("select * from restrictedkeys where cx_id='$id'");
<form method="post" action="">
Name:<input type="text" name="name" value="<?php echo $query2['Name']; ?>" /><br />
Address:<input type="text" name="address" value="<?php echo $query2['Address']; ?>" /><br /><br />
<br />
<input type="submit" name="submit" value="update" />

Answer Source

Simple enough. Your form will only be printed if this condition match:


Since the url is http://localhost/example/edit.php?id=382, it would really not work.

Change it to http://localhost/example/edit.php?ctx_id=382 and you might get some different result.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download