473,725 Members | 2,251 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Parse error: syntax error, unexpected T_ELSE in /opt/lampp/htdocs/Verify_user3.ph p o

1 New Member
Expand|Select|Wrap|Line Numbers
  1. <?  
  2.   $uname = $_REQUEST['email_id'];
  3.   $pass = $_REQUEST['password'];
  4.  
  5.  
  6.  /*Connecting, selecting database */
  7.   $LogStatus = 0;
  8.    $link = mysql_connect("localhost","root","kushal")
  9.        or die();
  10.  
  11.   mysql_select_db('mysql') or die();
  12.  
  13.     /* Performing SQL query */
  14.   $query  = "select Password from userinfo where Email_id='".$uname."'";
  15.  
  16.   $result = mysql_query($query) or die();
  17.  
  18.     while ($line = mysql_fetch_array($result, MYSQL_ASSOC))
  19.      {
  20.              $passwd = $line['Password'];
  21.             if ($pass == $passwd)
  22.         {
  23.          $LogStatus = 1;   
  24.          }
  25.         }
  26.  
  27.  
  28.  
  29.          if($LogStatus == 1 )
  30.      {
  31.  
  32.          if (!isset($_SESSION['UID']))
  33.           {
  34.             $_SESSION['UID'] = $uname;
  35.            } 
  36.         else
  37.          {
  38.             $_SESSION['UID'] = $uname;
  39.            }
  40.         if ($uname=='support')
  41.         {
  42.           include("Welcomeadmin.php");
  43.           }
  44.           else
  45.           {
  46.                include("Welcome1.php");  
  47.         }
  48.          }
  49.         else
  50.         {
  51.            include("Incorrectpwd.html");  ]
  52.            }
  53.  
  54.     /* Closing connection */
  55.    mysql_close($link); 
  56. ?>
i got a error msg like this:
Parse error: syntax error, unexpected T_ELSE in /opt/lampp/htdocs/Verify_user3.ph p on line 24

can u help me??
Dec 27 '07 #1
1 4889
RedSon
5,000 Recognized Expert Expert
First off, lets try posting to the proper forum. We have a forum titled "PHP" for a reason, lets try to think of that reason and remember it.

Next, when you created a new post did you happen to read the information box directly to the right of your text entry field. Its only about 3cm away, you probably don't even need to turn your head to look at it. It sais to use code tags around your code. They look like this: [CODE=php] code inside the brackets [/code]
Dec 28 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
15061
by: Marten van Urk | last post by:
I got the following error in my page Parse error: parse error, unexpected T_ELSE in line 25 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Club</title> </head> <style type="text/css">
6
2198
by: Ian Davies | last post by:
Hello I have found the following script php/java for dynamic menu lists. Where a selection from the first updates (filters items in) the other. I have modified it for my tables. However I am getting an error Parse error: parse error, unexpected T_VAR in e:\domains\i\iddsoftware.co.uk\user\htdocs\QuestionDB\Questions.php on line 42
4
22153
kestrel
by: kestrel | last post by:
I have some html code that is supposed to be displayed by php echo. But for some reason i keep getting a syntax error, and i cant figure out what is going on. Heres what i have <?php if(isset($_GET)) { echo "<div id="visible">"; echo "<span onclick="swapform()">Log In Form</span>"; echo "</div>"; echo "<div id="theform" style="visibility: hidden">";
4
6830
by: bhunesh | last post by:
hey , i m getting error listed below plz help me /virtualHosts/beta.myiris.com/htdocs/commodities/commd_admin/CRONJOB/new_cronjob/new_mcx.pl: line 14: syntax error near unexpected token `"/usr/bin/wget -O /tmp/mcx.dat http://www.mcxindia.com/xmlurl/GetTouchLine.aspx?userid=IRIS&pwd=CZ33M3KZ53"' #!/usr/bin/perl #Purpose : To create MCX DAT file from mcx feed coming from mcxindia.com #Author : Yatin Patil
3
6947
by: SilvaZodiac | last post by:
Hi everyone, I'm still rather new to PHP code, and I have a syntax error. I've tried several different solutions, but it won't fix. It seems to suggest that I need a new bracket somewhere in the offending line, but being amateur, I don't know where. I've tried putting one in several places, to no avail. Clearly, to solve this in a smaller period than a week I need someone with more skill to help out. Heh heh. The error is: Parse error:...
2
3226
by: Lawrence Krubner | last post by:
Imagine a template system that works by getting a file, as a string, and then putting it through eval(), something like this: $formAsString = $controller->command("readFileAndReturnString", $formName); // 06-22-07 - the next commands try to import all the functions that the
3
5597
paulrajj
by: paulrajj | last post by:
hi to all, i am getting syntax error on my code.. Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in D:\xampp\htdocs\Dummy\paulraj\matrim\exam.php on line 62 what's the actual problem here..? my code
4
1869
by: mmiller | last post by:
I have a pretty limited knowledge of PHP. My scenario is: I want one form to have two (2) submit buttons. I want one button to submit an email to a specific address then redirect to a page, and I want the second one to submit to the same email, then redirect to a different page. I've downloaded some code, so I can't take credit for it, but I'm trying to use my basic knowledge to create and IF and ELSE IF. Right now, I'm just trying to get...
5
2896
maxamis4
by: maxamis4 | last post by:
Hello folks, Learning PHP here and I am using sendmail.php to send an email. I have setup my html contact form and I am using the following to send an email once a confirmation has been made: <?php $to = "johnDoe@hotmail.com"; $tfirstName = $_REQUEST; $tlastName = $_REQUEST;
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9179
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9116
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8099
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3228
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.