electricbeat
Account Closed
- Impact
- 0
I have the following scripts that need to be re-ordered a little bit.
Basically, where I have:
wait, i'm confused myself. Basically, on this script, if you are logged and userlevel = 5 which is admin, it displays the above errror, but I don't need that, instead I need the part where it updates the mysql database etc, which I think is this part:
If anyone understands and can re-arrange my 5 pages of code which are all basically the same as this page apart from the query:
So basically, I need the stuff that shows if your not logged and userlevel 5, to show if you are logged and userlevel 5 and if your not, then the 404 which is displayed if you are userlevel 5.
willing to give 100np to get this working
Basically, where I have:
<h2>404 error</h2>
Page not found - We are unsure on how you reached this page although you could have reached this page for any of the following.<br /><br />
<li>Mispelt URL</li><br />
<li>Page no longer exists</li><br />
<li>Site / link error</li><br /><br />
If you are unsure on how you got it here enquire by the contact form.
wait, i'm confused myself. Basically, on this script, if you are logged and userlevel = 5 which is admin, it displays the above errror, but I don't need that, instead I need the part where it updates the mysql database etc, which I think is this part:
PHP:
$select = mysql_query("SELECT `leftside` FROM `users`") or die(mysql_error()); //gets the data
$query = mysql_fetch_array($select) or die(mysql_error());
//the form below to type your leftside
?><img src="images/rightside.PNG" /><br /><br /><b>RIGHT SIDE</b><BR />
<textarea cols="40" rows="7" name="leftside"><?php echo $query['leftside']; ?></textarea><br />
<input type="submit" name="update" value="Update the rightside">
<?php
if(isset($_POST['update'])) {
$leftside = ($_POST['leftside']); //filter all html
echo "<tr><td colspan='2'>The leftside have been updated.</td></tr>";
$update = mysql_query("UPDATE users SET leftside = '$leftside'"); //update the table
}
}
?>
</form>
If anyone understands and can re-arrange my 5 pages of code which are all basically the same as this page apart from the query:
PHP:
<form method="post">
<?php
if($logged[username] && $logged[level] ==5) { //checks or you logged in and have the correct rank
echo "<h2>404 error</h2>
Page not found - We are unsure on how you reached this page although you could have reached this page for any of the following.<br /><br />
<li>Mispelt URL</li><br />
<li>Page no longer exists</li><br />
<li>Site / link error</li><br /><br />
If you are unsure on how you got it here enquire by the contact form.";
}else{
include("config.php");
//gets the config page
$select = mysql_query("SELECT `links` FROM `users`") or die(mysql_error()); //gets the data
$query = mysql_fetch_array($select) or die(mysql_error());
//the form below to type your links
?>
<img src="images/links.PNG" /><br /><br /><b>LINKS</b><BR />
<textarea cols="40" rows="7" name="links"><?php echo $query['links']; ?></textarea><br />
<input type="submit" name="update" value="Update the links">
<?php
if(isset($_POST['update'])) {
$links = ($_POST['links']); //filter all html
echo "<tr><td colspan='2'>The links have been updated.</td></tr>";
$update = mysql_query("UPDATE users SET links = '$links'"); //update the table
}
}
?>
</form>
So basically, I need the stuff that shows if your not logged and userlevel 5, to show if you are logged and userlevel 5 and if your not, then the 404 which is displayed if you are userlevel 5.
willing to give 100np to get this working








