ShadeSlayer Posted May 28, 2009 Share Posted May 28, 2009 I have some code here for editing content on a page. Some of the stuff on this page just don't work. No errors displayed, no nothing. When you press on the submit button for these, instead of executing, it goes to the main page (bottom of script). The comments in this explain what works, what doesn't work, and some other things. I can't figure this out at all. admin.manage.php <?php ob_start("ob_gzhandler"); /* Readerboard Management File * Script by Alex Crooks * Copyright 2009, protected under Creative Commons Licence */ include("config.php"); $functionset = "admin"; if($_GET['page'] == "content") // Script displays content fine, add + edit page don't work. { $pagetitle = "Manage Content"; $output = "This page is for managing your base content. You may add, edit, or delete them. Choose an appropriate graphic that corresponds to what you'd like to do.<br /><br />\n" ."<table width=\"100%\" border=\"1\" bgcolor=\"#ffffff\">\n" ."<tr align=\"center\">\n" ."<td><b>ID</b></td>\n" ."<td><b>Title</b></td>\n" ."<td style=\"width: 30px;\"><b>Edit</b></td>\n" ."<td style=\"width: 30px;\"><b>Delete</b></td>\n" ."</tr>\n"; $sql = "SELECT * FROM ".TABLE_CONTENT." ORDER BY ID ASC"; if($exe = mysql_query($sql)) { while($row = mysql_fetch_array($exe)) { $row['editlink'] = "<a href=\"".$_SERVER['PHP_SELF']."?page=content&action=edit&wid=".$row['ID']."\"><img style=\"width: 25px; height: 25px;\" src=\"edit.png\" /></a>"; $row['deletelink'] = "<a href=\"".$_SERVER['PHP_SELF']."?page=content&action=delete&wid=".$row['ID']."\"><img style=\"width: 25px; height: 25px;\" src=\"delete.png\" /></a>"; $output .= "<tr>\n" ."<td>".$row['ID']."</td>\n" ."<td>".stripslashes($row['title'])."</td>\n" ."<td>".$row['editlink']."</td>\n" ."<td>".$row['deletelink']."</td>\n" ."</tr>\n"; } } $output .= "</table><br /><br />\n" ."<a href=\"".$_SERVER['PHP_SELF']."?page=content&action=add\"><img style=\"width: 25px; height: 25px;\" src=\"add.png\" /> Add New</a>\n"; if($_GET['action'] == "add") // Script doesn't execute, Submit button sends you to the main page. { $output = "<form action=\"".$_SERVER['PHP_SELF']."?page=content&action=add\">\n" ."<b>Title:</b> <input type=\"text\" name=\"title\" value=\"\" /><br />\n" ."<b>Content:</b><textarea style=\"width: 100%; height: 100px;\" name=\"body\" value=\"\"></textarea><br /><br />\n" ."<input type=\"hidden\" name=\"do\" value=\"process\" />\n" ."<input type=\"submit\" />\n" ."</form>\n"; if($_POST['do'] == "process") // Gets skipped { $sql = "INSERT INTO ".TABLE_CONTENT." (title, body) VALUES ('".addslashes($_POST['title'])."', '".addslashes($_POST['body'])."')"; if($exe = mysql_query($sql)) { $output = "Content item successfully added.\n"; } } } if($_GET['action'] == "edit") // Script doesn't execute, Submit button sends you to the main page. { $sql = "SELECT * FROM ".TABLE_CONTENT." WHERE ID = '".$_GET['wid']."'"; $row = mysql_fetch_array(mysql_query($sql)); $output = "<form action=\"".$_SERVER['PHP_SELF']."?page=content&action=edit\">\n" ."<b>Title:</b> <input type=\"text\" name=\"title\" value=\"".stripslashes($row['title'])."\" /><br />\n" ."<b>Content:</b><textarea style=\"width: 100%; height: 100px;\" name=\"body\" value=\"\">".stripslashes($row['body'])."</textarea><br /><br />\n" ."<input type=\"hidden\" name=\"do\" value=\"process\" />\n" ."<input type=\"submit\" />\n" ."</form>\n"; if($_POST['do'] == "process") // Gets skipped { $sql = "UPDATE ".TABLE_CONTENT." SET title = '".addslashes($_POST['title'])."', body = '".addslashes($_POST['body'])."' WHERE ID = '".$_GET['wid']."'"; if($exe = mysql_query($sql)) { $output = "Content item #".$_GET['wid']." successfully updated.\n"; } } } if($_GET['action'] == "delete") // Works { $sql = "DELETE FROM ".TABLE_CONTENT." WHERE ID = '".$_GET['wid']."'"; if($exe = mysql_query($sql)) { $output = "Content item #".$_GET['wid']." successfully removed.\n"; } } } if($_GET['page'] == "messages") // Displaying of content works.. adding and editing doesnt { $pagetitle = "Manage Messages"; $output = "This page is for managing your messages. You may add, edit, or delete them. Choose an appropriate graphic that corresponds to what you'd like to do.\n" ."<table width=\"100%\" border=\"1\" bgcolor=\"#ffffff\">\n" ."<tr align=\"center\">\n" ."<td><b>ID</b></td>\n" ."<td><b>Name</b></td>\n" ."<td style=\"width: 30px;\"><b>Edit</b></td>\n" ."<td style=\"width: 30px;\"><b>Delete</b></td>\n" ."</tr>\n"; $sql = "SELECT * FROM ".TABLE_MESSAGES." ORDER BY ID ASC"; if($exe = mysql_query($sql)) { while($row = mysql_fetch_array($exe)) { $row['editlink'] = "<a href=\"".$_SERVER['PHP_SELF']."?page=messages&action=edit&wid=".$row['ID']."\"><img style=\"width: 25px; height: 25px;\" src=\"edit.png\" /></a>"; $row['deletelink'] = "<a href=\"".$_SERVER['PHP_SELF']."?page=messages&action=delete&wid=".$row['ID']."\"><img style=\"width: 25px; height: 25px;\" src=\"delete.png\" /></a>"; $output .= "<tr>\n" ."<td>".$row['ID']."</td>\n" ."<td>".stripslashes($row['name'])."</td>\n" ."<td>".$row['editlink']."</td>\n" ."<td>".$row['deletelink']."</td>\n" ."</tr>\n"; } } $output .= "</table><br /><br />\n" ."<a href=\"".$_SERVER['PHP_SELF']."?page=messages&action=add\"><img style=\"width: 25px; height: 25px;\" src=\"add.png\" /> Add New</a>\n"; if($_GET['action'] == "add") // Script doesn't execute, Submit button sends you to the main page. { $output = "<form action=\"".$_SERVER['PHP_SELF']."?page=messages&action=add\">\n" ."<b>Name:</b> <input type=\"text\" name=\"name\" value=\"\" />\n" ."<input type=\"hidden\" name=\"do\" value=\"process\" />\n" ."<input type=\"submit\" />\n" ."</form>"; if($_POST['do'] == "process") // Gets Skipped { $sql = "INSERT INTO ".TABLE_MESSAGES." (name) VALUES ('".addslashes($_POST['name'])."')"; if($exe = mysql_query($sql)) { $output = $_POST['name']." successfully added to the messages.\n"; } } } if($_GET['action'] == "edit") // Script doesn't execute, Submit button sends you to the main page. { $sql = "SELECT * FROM ".TABLE_MESSAGES." WHERE ID = '".$_GET['wid']."'"; $row = mysql_fetch_array(mysql_query($sql)); $output = "<form action=\"".$_SERVER['PHP_SELF']."?page=messages&action=edit\">\n" ."<b>Name:</b> <input type=\"text\" name=\"name\" value=\"".stripslashes($row['name'])."\" />\n" ."<input type=\"hidden\" name=\"do\" value=\"process\" />\n" ."<input type=\"submit\" />\n" ."</form>\n"; if($_POST['do'] == "process") // Gets skipped { $sql = "UPDATE ".TABLE_MESSAGES." SET name = '".addslashes($_POST['name'])."' WHERE ID = '".$_GET['wid']."'"; if($exe = mysql_query($sql)) { $output = $_POST['name']." successfully updated.\n"; } } } if($_GET['action'] == "delete") // Works. { $sql = "DELETE FROM ".TABLE_MESSAGES." WHERE ID = '".$_GET['wid']."'"; if($exe = mysql_query($sql)) { $output = $_POST['name']." successfully removed from the messages.\n"; } } } if($_GET['page'] == "status") // Script doesn't execute, Submit button sends you to the main page. Radio buttons don't display what is selected. { $pagetitle = "Manage Status"; $sql = "SELECT ID, status FROM ".TABLE_SETTINGS." WHERE ID = '1'"; $row = mysql_fetch_array(mysql_query($sql)); $row['status'] = $s; $output = "This page is for managing the readerboard status.<br /><br />\n" ."<b>Readerboard Status:</b><br />\n" ."<form action=\"".$_SERVER['PHP_SELF']."?page=status\" method=\"post\">\n" ."<input type=\"radio\" name=\"stat\" value=\"1\" "; if($s == "1") { $output .= "selected=\"selected\""; } $output .= "/> Enabled\n" ."<input type=\"radio\" name=\"stat\" value=\"0\" "; if($s == "0") { $output .= "selected=\"selected\""; } $output .= "/> Disabled \n" ."<input type=\"hidden\" name=\"do\" value=\"process\" /><br /><br />\n" ."<input type=\"submit\" />\n" ."</form>\n"; if($_POST['do'] == "process") // Gets skipped { $sql = "UPDATE ".TABLE_SETTINGS." SET status = '".$_POST['stat']."'"; if($exe = mysql_query($sql)) { $output = "Query Successful.\n"; } } } if($_GET['page'] == "stylesheet") // Script doesn't execute, Submit button sends you to the main page. { $pagetitle = "Manage Stylesheet"; $output = "This page is for managing your stylesheet and banner. Don't edit the stylesheet unless you are experienced with the code.\n"; $sql = "SELECT stylesheet FROM ".TABLE_SETTINGS; $row = mysql_fetch_array(mysql_query($sql)); $output .= "<form action=\"".$_SERVER['PHP_SELF']."?page=stylesheet\">\n" ."<textarea style=\"width: 90%; height: 200px;\" name=\"stylesheet\" value=\"\">".$row['stylesheet']."</textarea><br /><br />\n" ."<input type=\"hidden\" name=\"do\" value=\"process\" />\n" ."<input type=\"submit\" />\n"; if($_POST['do'] == "process") // Gets skipped { $sql = "UPDATE ".TABLE_SETTINGS." SET stylesheet = '".$_POST['stylesheet']."'"; if($exe = mysql_query($sql)) { $output = "Stylesheet successfully updated.\n"; } } } if(($_GET['page'] == "") || (!$_GET['page'])) // When the Submit button is pressed, everything seems to come here... { $pagetitle = "Management Page"; $output = "Welcome to the Readerboard management page. Please choose an option to your left.<br /><br />\n" ."<b>Manage Content:</b><br />\n" ."Allows you to add, edit, or delete any piece of main content. Also includes a format bar to edit various information (and include pictures).<br /><br />\n" ."<b>Manage Messages:</b><br />\n" ."Allows you to add, edit, or delete the messages at the office for people. Also includes a color bar to edit the color of the text.<br /><br />\n" ."<b>Manage Status:</b><br />\n" ."Allows you to edit whether or not the readerboard is live.<br /><br />\n" ."<b>Manage Stylesheet:</b><br />\n" ."Allows you to edit the banner and style of the readerboard.\n"; } $pagecontents = $output; include("layout.php"); ?> All the other files work fine. They've been tested repeatedly, so it must be a problem with these specific scripts. Thanks a bunch! Link to comment https://forums.phpfreaks.com/topic/159987-forms-not-executing-and-instead-skipping-to-the-home-page/ Share on other sites More sharing options...
ShadeSlayer Posted May 28, 2009 Author Share Posted May 28, 2009 Alright. I just found out a potential problem. The URL of the script when I click submit (this example will be for page=content) is not what it should be. The URL displays like this (which is also likely the reason it's displaying the main page): admin.manage.php?title=fasdfgasg&body=sfasdfasd&do=process Instead of: admin.manage.php?page=content&do=process Which must be a bit of a security flaw, but alas, even after adding a hidden tag at the top of the form instructing it to go to page=content, the script still doesn't work. I'm sure this URL issue could be helpful to you guys, though. Link to comment https://forums.phpfreaks.com/topic/159987-forms-not-executing-and-instead-skipping-to-the-home-page/#findComment-843901 Share on other sites More sharing options...
Alt_F4 Posted May 28, 2009 Share Posted May 28, 2009 try this $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'] instead of this $_SERVER['PHP_SELF'] that should give you the path 'admin.manage.php' the $_SERVER['PHP_SELF'] also includes the query string in the path see how you go Link to comment https://forums.phpfreaks.com/topic/159987-forms-not-executing-and-instead-skipping-to-the-home-page/#findComment-843907 Share on other sites More sharing options...
ShadeSlayer Posted May 28, 2009 Author Share Posted May 28, 2009 Nope, doesn't work. The link turns in to: /admin.manage.php?title=lollerskater&body=safadgs&do=process What I believe part of the problem is, is that there isn't the "?page=manage.php" in there, but adding that via the <input hidden... /> tag doesn't help... So I'm still unsure of the problem. Link to comment https://forums.phpfreaks.com/topic/159987-forms-not-executing-and-instead-skipping-to-the-home-page/#findComment-844314 Share on other sites More sharing options...
elis Posted May 28, 2009 Share Posted May 28, 2009 if($_POST['do'] == "process") // Gets skipped should be if(isset($_POST['do'])) ETA: Maybe not, I may have misread the code. Link to comment https://forums.phpfreaks.com/topic/159987-forms-not-executing-and-instead-skipping-to-the-home-page/#findComment-844318 Share on other sites More sharing options...
ShadeSlayer Posted May 28, 2009 Author Share Posted May 28, 2009 Yeah, the isset didn't fix it. Link to comment https://forums.phpfreaks.com/topic/159987-forms-not-executing-and-instead-skipping-to-the-home-page/#findComment-844322 Share on other sites More sharing options...
ShadeSlayer Posted May 28, 2009 Author Share Posted May 28, 2009 Man, I thought I just found the problem. All of the forms looked like this: <form action=\"http://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']."\"> so I edited them to this: <form action=\"http://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']."\" method=\"post\"> to include the "method=\"post\"". It still doesn't work, though. Link to comment https://forums.phpfreaks.com/topic/159987-forms-not-executing-and-instead-skipping-to-the-home-page/#findComment-844338 Share on other sites More sharing options...
Alt_F4 Posted May 29, 2009 Share Posted May 29, 2009 OK try this out (there may be some syntax errors as i removed the escape characters and may have missed some) also i don't have access to your database (obviously) so i cant check if the stuff using the query results works (your code there looks solid though) <?php ob_start("ob_gzhandler"); /* Readerboard Management File * Script by Alex Crooks * Copyright 2009, protected under Creative Commons Licence */ include("config.php"); $functionset = "admin"; if($_GET['page'] == "content") {// Script displays content fine, add + edit page don't work. $pagetitle = "Manage Content"; $output = 'This page is for managing your base content. You may add, edit, or delete them. Choose an appropriate graphic that corresponds to what you\'d like to do.<br /><br />' .'<table width="100%" border="1" bgcolor="#ffffff">' .'<tr align="center">' .'<td><b>ID</b></td>' .'<td><b>Title</b></td>' .'<td style="width: 30px;"><b>Edit</b></td>' .'<td style="width: 30px;"><b>Delete</b></td>' .'</tr>'; $sql = "SELECT * FROM ".TABLE_CONTENT." ORDER BY ID ASC"; if($exe = mysql_query($sql)) { while($row = mysql_fetch_array($exe)) { $row['editlink'] = '<a href="'.$_SERVER['PHP_SELF'].'?page=content&action=edit&wid='.$row['ID'].'"><img style="width: 25px; height: 25px;" src="edit.png" /></a>'; $row['deletelink'] = '<a href="'.$_SERVER['PHP_SELF'].'?page=content&action=delete&wid='.$row['ID'].'"><img style="width: 25px; height: 25px;" src="delete.png" /></a>'; $output .= '<tr>' .'<td>'.$row['ID'].'</td>' .'<td>'.stripslashes($row['title']).'</td>' .'<td>'.$row['editlink'].'</td>' .'<td>'.$row['deletelink'].'</td>' .'</tr>'; } } $output .= '</table><br /><br />' .'<a href="'.$_SERVER['PHP_SELF'].'?page=content&action=add"><img style="width: 25px; height: 25px;" src="add.png" /> Add New</a>'; if($_GET['action'] == "add") { // Script doesn't execute, Submit button sends you to the main page. $output = '<form action="'.$_SERVER['PHP_SELF'].'" method="get">' .'<b>Title:</b> <input type="text" name="title" value="" /><br />' .'<b>Content:</b><textarea style="width: 100%; height: 100px;" name="body" value=""></textarea><br /><br />' .'<input type="hidden" name="do" value="process" />' .'<input type="hidden" name="page" value="'.$_GET['page'].'" />' .'<input type="hidden" name="action" value="'.$_GET['action'].'" />' .'<input type="submit" />' .'</form>'; if($_GET['do'] == "process") {// Changed POST to GET echo "item added"; $sql = "INSERT INTO ".TABLE_CONTENT." (title, body) VALUES ('".addslashes($_GET['title'])."', '".addslashes($_GET['body'])."')"; if($exe = mysql_query($sql)) { $output = "Content item successfully added.\n"; } } } if($_GET['action'] == "edit") {// Script doesn't execute, Submit button sends you to the main page. $sql = "SELECT * FROM ".TABLE_CONTENT." WHERE ID = '".$_GET['wid']."'"; $row = mysql_fetch_array(mysql_query($sql)); $output = '<form action="'.$_SERVER['PHP_SELF'].'" method="get">' .'<b>Title:</b> <input type="text" name="title" value="'.stripslashes($row['title']).'" /><br />\n' .'<b>Content:</b><textarea style="width: 100%; height: 100px;" name="body" value="">'.stripslashes($row['body']).'</textarea><br /><br />' .'<input type="hidden" name="do" value="process" />' .'<input type="hidden" name="page" value="'.$_GET['page'].'" />' .'<input type="hidden" name="action" value="'.$_GET['action'].'" />' .'<input type="submit" />' .'</form>'; if($_GET['do'] == "process") {// Changed POST to GET $sql = "UPDATE ".TABLE_CONTENT." SET title = '".addslashes($_GET['title'])."', body = '".addslashes($_GET['body'])."' WHERE ID = '".$_GET['wid']."'"; if($exe = mysql_query($sql)) { $output = "Content item #".$_GET['wid']." successfully updated.\n"; } } } if($_GET['action'] == "delete") {// Works $sql = "DELETE FROM ".TABLE_CONTENT." WHERE ID = '".$_GET['wid']."'"; if($exe = mysql_query($sql)) { $output = "Content item #".$_GET['wid']." successfully removed.\n"; } } } if($_GET['page'] == "messages") {// Displaying of content works.. adding and editing doesnt $pagetitle = "Manage Messages"; $output = 'This page is for managing your messages. You may add, edit, or delete them. Choose an appropriate graphic that corresponds to what you\'d like to do.' .'<table width="100%" border="1" bgcolor="#ffffff">' .'<tr align="center">' .'<td><b>ID</b></td>' .'<td><b>Name</b></td>' .'<td style="width: 30px;"><b>Edit</b></td>' .'<td style="width: 30px;"><b>Delete</b></td>' .'</tr>'; $sql = "SELECT * FROM ".TABLE_MESSAGES." ORDER BY ID ASC"; if($exe = mysql_query($sql)) { while($row = mysql_fetch_array($exe)) { $row['editlink'] = '<a href="'.$_SERVER['PHP_SELF'].'?page=messages&action=edit&wid='.$row['ID'].'"><img style="width: 25px; height: 25px;" src="edit.png" /></a>'; $row['deletelink'] = '<a href="'.$_SERVER['PHP_SELF'].'?page=messages&action=delete&wid='.$row['ID'].'"><img style="width: 25px; height: 25px;" src="delete.png" /></a>'; $output .= '<tr>' .'<td>'.$row['ID'].'</td>' .'<td>'.stripslashes($row['name']).'</td>' .'<td>'.$row['editlink'].'</td>' .'<td>'.$row['deletelink'].'</td>' .'</tr>'; } } $output .= '</table><br /><br />' .'<a href="'.$_SERVER['PHP_SELF'].'?page=messages&action=add"><img style="width: 25px; height: 25px;" src="add.png" /> Add New</a>'; if($_GET['action'] == "add") { // Script doesn't execute, Submit button sends you to the main page. $output = '<form action="'.$_SERVER['PHP_SELF'].'" method="get">' .'<b>Name:</b> <input type="text" name="name" value="" />' .'<input type="hidden" name="do" value="process" />' .'<input type="hidden" name="page" value="'.$_GET['page'].'" />' .'<input type="hidden" name="action" value="'.$_GET['action'].'" />' .'<input type="submit" />' .'</form>'; if($_GET['do'] == "process"){ // Changed POST to GET $sql = "INSERT INTO ".TABLE_MESSAGES." (name) VALUES ('".addslashes($_GET['name'])."')"; if($exe = mysql_query($sql)) { $output = $_GET['name']." successfully added to the messages.\n"; } } } if($_GET['action'] == "edit") // Script doesn't execute, Submit button sends you to the main page. { $sql = "SELECT * FROM ".TABLE_MESSAGES." WHERE ID = '".$_GET['wid']."'"; $row = mysql_fetch_array(mysql_query($sql)); $output = '<form action="'.$_SERVER['PHP_SELF'].' method="get">' .'<b>Name:</b> <input type="text" name="name" value="'.stripslashes($row['name']).'" />' .'<input type="hidden" name="do" value="process" />' .'<input type="hidden" name="page" value="'.$_GET['page'].'" />' .'<input type="hidden" name="action" value="'.$_GET['action'].'" />' .'<input type="submit" />' .'</form>'; if($_GET['do'] == "process") { // Changed POST to GET $sql = "UPDATE ".TABLE_MESSAGES." SET name = '".addslashes($_GET['name'])."' WHERE ID = '".$_GET['wid']."'"; if($exe = mysql_query($sql)) { $output = $_GET['name']." successfully updated.\n"; } } } if($_GET['action'] == "delete") { // Works. $sql = "DELETE FROM ".TABLE_MESSAGES." WHERE ID = '".$_GET['wid']."'"; if($exe = mysql_query($sql)) { $output = $_GET['name']." successfully removed from the messages.\n"; } } } if($_GET['page'] == "status") { // Script doesn't execute, Submit button sends you to the main page. Radio buttons don't display what is selected. $pagetitle = "Manage Status"; $sql = "SELECT ID, status FROM ".TABLE_SETTINGS." WHERE ID = '1'"; $row = mysql_fetch_array(mysql_query($sql)); $row['status'] = $s; $output = 'This page is for managing the readerboard status.<br /><br />' .'<b>Readerboard Status:</b><br />' .'<form action="'.$_SERVER['PHP_SELF'].'" method="get">' .'<input type="hidden" name="page" value="'.$_GET['page'].'" />' .'<input type="radio" name="stat" value="1" '; if($s == "1") { $output .= 'selected="selected"'; } $output .= '/> Enabled' .'<input type="radio" name="stat" value="0" '; if($s == "0"){ $output .= 'selected="selected"'; } $output .= '/> Disabled ' .'<input type="hidden" name="do" value="process" /><br /><br />' .'<input type="submit" />' .'</form>'; if($_GET['do'] == "process") { //changed POST to GET $sql = "UPDATE ".TABLE_SETTINGS." SET status = '".$_GET['stat']."'"; if($exe = mysql_query($sql)) { $output = "Query Successful."; } } } if($_GET['page'] == "stylesheet") { // Script doesn't execute, Submit button sends you to the main page. $pagetitle = "Manage Stylesheet"; $output = 'This page is for managing your stylesheet and banner. Don\'t edit the stylesheet unless you are experienced with the code.'; $sql = "SELECT stylesheet FROM ".TABLE_SETTINGS; $row = mysql_fetch_array(mysql_query($sql)); $output .= '<form action="'.$_SERVER['PHP_SELF'].'" method="get">' .'<textarea style="width: 90%; height: 200px;" name="stylesheet" value=""'.$row['stylesheet'].'</textarea><br /><br />' .'<input type="hidden" name="do" value="process" />' .'<input type="hidden" name="page" value="'.$_GET['page'].'" />' .'<input type="submit" />'; if($_GET['do'] == "process") { // changed POST to GET $sql = "UPDATE ".TABLE_SETTINGS." SET stylesheet = '".$_GET['stylesheet']."'"; if($exe = mysql_query($sql)) { $output = "Stylesheet successfully updated."; } } } if(($_GET['page'] == "") || (!$_GET['page'])) { // When the Submit button is pressed, everything seems to come here... $pagetitle = "Management Page"; $pagetitle = "Management Page"; $output = 'Welcome to the Readerboard management page. Please choose an option to your left.<br /><br />' .'<b>Manage Content:</b><br />' .'Allows you to add, edit, or delete any piece of main content. Also includes a format bar to edit various information (and include pictures).<br /><br />' .'<b>Manage Messages:</b><br />' .'Allows you to add, edit, or delete the messages at the office for people. Also includes a color bar to edit the color of the text.<br /><br />' .'<b>Manage Status:</b><br />' .'Allows you to edit whether or not the readerboard is live.<br /><br />' .'<b>Manage Stylesheet:</b><br />' .'Allows you to edit the banner and style of the readerboard.'; } $pagecontents = $output; include("layout.php"); ?> let me know how you get on. Link to comment https://forums.phpfreaks.com/topic/159987-forms-not-executing-and-instead-skipping-to-the-home-page/#findComment-844717 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.