dean7 Posted March 31, 2010 Share Posted March 31, 2010 Hi all, I have a website which im coding a todo list for it, so I put what im going to do in the table so i wont forget but, ive got to a point of my code and i carnt seem to sort this problem... <?php session_start(); error_reporting(E_ALL); ini_set("display_errors", 1); include ("includes/functions.php"); include ("includes/config.php"); $username = $_SESSION['username']; $get = mysql_query("SELECT * FROM users WHERE username = '$username'"); $got = mysql_fetch_object($get); if ($_POST['submit']{ //open 1 $title = $_POST['title']; $todo = $_POST['todo']; $des = $_POST['des']; mysql_query("INSERT INTO todo (`id`, `title`, `todo`, `date`, `description`) VALUES ('', '$title', '$todo', now(), '$des')"); ?> <html> <head> <title>Things being done...</title> </head> <body class="body"> <link rel=stylesheet href=regstyle.css type=text/css> <center><table width="80%" cellpadding="0" cellspacing="0" border="1" bordercolor="#000000" bgcolor="#333333"> <tr> <td colspan="20" class="header tablestyle"><center><b>Things being done...</b></center></td> </tr> <tr> <td class="tablestyle forum" colspan="5">Title</td><td class="tablestyle forum" colspan="5">To Do</td><td class="tablestyle forum" colspan="5">Description</td><td colspan="3" class="tablestyle forum">Posted</td><td width="16%" colspan="3" class="tablestyle forum">Done / Not Done</td> </tr> <tr> <?php echo ("<td class='tabelstyle' colspan='3'>$title</td><td class='tabelstyle' colspan='3'>$todo</td><td class='tabelstyle' colspan='3'>$des</td><td class='tabelstyle' colspan='3'>$now();</td><td class='tabelstyle' colspan='3'>Done / Not Done</td></tr>"); ?> </table> </center> <?php if ($got->userlevel != 4){ echo ("Page Carnt Be Seen!"); else { echo ('<center><table width="50%" cellpadding="0" cellspacing="0" border="1" bordercolor="#000000" bgcolor="#333333"> <tr> <td class="tablestyle header" colspan="5"><center>Add Todo?</center></td> </tr> <td class="tablestyle" colspan="3">Title:</td><td width="54%" colspan="3" class="tablestyle"><input type="text" name="title" id="title" size="40"/></td> </tr> <tr> <td class="tablestyle" colspan="3">To Do</td><td class="tablestyle" colspan="3"><input type="text" name="todo" id="todo" size="40"/></td> </tr> <tr> <td class="tablestyle" colspan="3">Description</td><td class="tablestyle" colspan="3"><input type="text" name="des" id="des" size="40" /></td> </tr> <tr> <td class="tablestyle" colspan="3"><input type="hidden" name="date" id="now()" /></td><td class="tablestyle" colspan="3"><input type="submit" name="submit" value="Add thing..." /></td> </tr> </table> </center>'); } } } ?> </body> </html> For some reason its showing a blank white page :S. Anyone see why it is ? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/197087-dont-show-page/ Share on other sites More sharing options...
trq Posted March 31, 2010 Share Posted March 31, 2010 The first thing I notice is this.... if ($_POST['submit']{ //open 1 should be.... if (isset($_POST['submit'])) { //open 1 You where missing a ) Quote Link to comment https://forums.phpfreaks.com/topic/197087-dont-show-page/#findComment-1034605 Share on other sites More sharing options...
dean7 Posted March 31, 2010 Author Share Posted March 31, 2010 Ok, thanks for pointing that out. Ive changed it but it still isnt displaying anything Quote Link to comment https://forums.phpfreaks.com/topic/197087-dont-show-page/#findComment-1034644 Share on other sites More sharing options...
PFMaBiSmAd Posted March 31, 2010 Share Posted March 31, 2010 There is (another) fatal parse error on line 39 due to a missing } You should be learning php, developing php code, and debugging php code on a system with error_reporting set to E_ALL and display_errors set to ON in your master php.ini so that php will help you by displaying all the errors it detects. You will save a TON of time. Stop and start your web server to get any change to the php.ini to take effect and use a phpinfo() statement to confirm that the settings were actually changed (in case the php.ini that you are changing is not the one that php is using.) Quote Link to comment https://forums.phpfreaks.com/topic/197087-dont-show-page/#findComment-1034646 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.