Login | Register | FAQ
Anonymous

Parse error: syntax error, unexpected T_STRING in G:\PleskVh

+ Post a reply

2 posts Page 1 of 1


Parse error: syntax error, unexpected T_STRING in G:\PleskVh

by sroysoftware » Sat May 30, 2015 2:25 pm

Sir Here is my code but it says
Parse error: syntax error, unexpected T_STRING in G:\PleskVhosts\swister.in\httpdocs\submit_data.php on line 5
Here is HTML code

<form action="submit_data.php" method="post" name="RegForm" target="_self" id="RegForm">
<table width="598" border="0" align="center">
<tr>
<td width="553"><table width="555" border="0">
<tr>
<td width="200"><label>
<h2> First Name</h2> <br />
<input name="txtName" type="text" class="StyleTextField" id="txtName" maxlength="30" />
</label></td>
<td width="345"><label>
<h2>Last Name </h2>
<br />
</label> <input name="txtLastName" type="text" class="StyleTextField" id="txtLastName" maxlength="30" /> </td>
</tr>
</table>
<label></label></td>
</tr>
<tr bordercolor="#FF00FF">
<td bordercolor="#FF00FF"><h2>Date of Birth (DDMMYYYY)
</h2>
<p>
<input name="txtDob" type="text" class="StyleTextField" id="txtDob" maxlength="8"/>
</p></td>
</tr>
<tr bordercolor="#FF00FF">
<td><h2>Email</h2>
<p>
<input name="txtEmail" type="text" class="StyleTextField" id="txtEmail"/>
</p></td>
</tr>
<tr bordercolor="#FF00FF">
<td><label>
<table width="555" border="0">
<tr>
<td width="389"><h2>Mobile No (With country code)</h2>
</p>
<p>
<input name="txtMobile" type="text" class="StyleTextField" id="txtMobile" maxlength="15" />
</p></td>
<td width="150" bordercolor="#FF00FF"><h2>&nbsp;</h2>
</p>
<p>&nbsp;</p></td>
</tr>
</table>
</label></td>
</tr>
<tr>
<td><table width="394" border="0">
<tr>
<td><h2>User Name
</h2>
<p>
<input name="txtUserName" type="text" class="StyleTextField" id="txtUserName" maxlength="8" />
</p></td>
<td>&nbsp;</td>
</tr>
<tr>
<td width="192"><label> <h2>Password</h2><br />
<input name="txtPassword" type="password" class="StyleTextField" id="txtPassword" maxlength="15" />
</label></td>
<td width="195"><label><h2> Confirm Password </h2><br />
<input name="txtPasswordConfirm" type="password" class="StyleTextField" id="txtPasswordConfirm" maxlength="15" />
</label></td>
</tr>
</table></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><label>
<h2>By clicking Register you are agree to our <a href="T and C.php">
<tac>Terms and Conditions</tac>
</a>. </label></h2> </td>
</tr>
<tr>
<td><input name="RegisterButton" type="submit" id="RegisterButton" value="Register" onclick="validate()" /></td>
</tr>
</table>
</form>

Here is PHP Code:

<?php
mysql_connect("example","member","pass") or die(mysql_error());
mysql_select_db("swister") or die(mysql_error());
$strSQL="INSERT INTO members(FirstName) values('".$_POST["txtName"] . "')"
$strSQL="INSERT INTO members(LastName) values('".$_POST["txtLastName"] . "')"
$strSQL="INSERT INTO members(MobileNo) values('".$_POST["txtMobile"] . "')"
$strSQL="INSERT INTO members(BirthDate) values('".$_POST["txtDob"] . "')"
$strSQL="INSERT INTO members(Email) values('".$_POST["txtEmail"] . "')"
$strSQL="INSERT INTO members(Password) values('".$_POST["txtPassword"]."')"
mysql_close();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="refresh" content="10; url=http://swister.in/Login.php"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Swister | Submit Information</title>
</head>

<body>
Creating your Profile Please wait...... It can take less then 15 seconds
</body>
</html>
User avatar

sroysoftware

  • Posts: 1
  • Joined: Sat May 30, 2015 2:20 pm

Re: Parse error: syntax error, unexpected T_STRING in G:\Ple

by XainPro » Tue Jun 09, 2015 1:25 pm

you are using too much insert use a single insert statement like this

insert into tablename (field1, field2, field3) values ("value1", "value2", "value3");
User avatar

XainPro

  • Posts: 3933
  • Joined: Fri Feb 17, 2012 8:10 pm


+ Post a reply

Page 1 of 1