Jump to content

Unexpected $end


DJTim666

Recommended Posts

Here is the code. Like it says in the title I am getting the unexpected $end error near the end of the coding.

 

<?php
include('header.php');
echo"<font color='blue'>Welcome %yourname to the account mananger section, please follow all admin rules before doing anything elligal!<br><br></font>";
echo"<a href='$PHP_SELF'>Home</a> | <a href='$PHP_SELF?act=edit'>Edit-User</a> | Warn | Browse-Users | CheckUser-Logs | FreezeUser | IPBANN<br><br>";

if(!$act) {
echo"This will show how many users you have frozen, edit etc. to be done very soon";
}

/////Start edit user
if($act == 'edit') {

                 if($userinfo[level] <= 0) {
                  showerror("Sorry but you dont have access to this area yet!");
                 }
         
         
                 if(!isset($_POST[e_user])) {
              echo"Enter username to edit.<br>
              <form action='$PHP_SELF?act=edit' method='post'>
              <input type='text' name='e_user'><br>
              <input type='submit' value='Edit User!'><br>
              ";
              }
                if(isset($_POST[e_user])) {
             $e_user = mysql_real_escape_string($_POST[e_user]);
             $sql0 = mysql_query("SELECT * FROM user WHERE username='$e_user'");
             $sql = mysql_fetch_array($sql0);

             //Check to see if user exist
             if(mysql_num_rows($sql0) == 0) {
              showerror("User does not exist!");
              }

              //Shows the edituser input
              echo <<<EDITU
              Username:
              User-Id:
              Password:
              EDITU;
             }
         }
//edit user ends



include('footer.php');
?>

 

--

DJ

Link to comment
Share on other sites

if(isset($_POST[e_user]))

{

            $e_user = mysql_real_escape_string($_POST[e_user]);

            $sql0 = mysql_query("SELECT * FROM user WHERE username='$e_user'");

            $sql = mysql_fetch_array($sql0);

}//missing

Link to comment
Share on other sites

Your observant aren't you. If you check near the end it is closed with a bracket ;)!

 

EDIT: Sorry about that. I edited the code, and my edited version(the version above) works perfectly. The uneditted version has to many '/////////' for a single line comment.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.