473,799 Members | 3,229 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Parse error: syntax error, unexpected T_VARIABLE in on line 7

4 New Member
Hey, I'm getting the error:
Parse error: syntax error, unexpected T_VARIABLE in Z:\home\baza\ww w\get2.php on line 7

with this code (have 2 pages , html-from page (reguser.php) and php(get2.php))w ork with mysql

retuser.php
Expand|Select|Wrap|Line Numbers
  1. <br><a href='security.php'>Вернуться</a>
  2. <form action="get2.php" method="POST">
  3. <table>
  4. <tr>
  5. <td align="left">ФИО пользователя:<br />
  6. <input type="text" name="fio" size="10" maxlength="20" />
  7. </td>
  8. </tr>
  9. <tr>
  10. <td align="left">Номер паспорта:<br />
  11. <input type="text" name="pasnomer" size="10" maxlength="20" />
  12. </td>
  13. </tr>
  14. <tr>
  15. <td align="left">Контактный номер телефона:<br />
  16. <input type="text" name="telnomer" size="10" maxlength="20" />
  17. </td>
  18. </tr>
  19. <tr>
  20. <td align="left">Номер автомобиля:<br />
  21. <input type="text" name="avtonomer" size="10" maxlength="20" />
  22. </td>
  23. </tr>
  24. <tr>
  25.  <tr>
  26. <td align="left">Марка автомобиля:<br />
  27. <input type="text" name="marka" size="10" maxlength="20" />
  28. </td>
  29. </tr>
  30.  <tr>
  31. <td align="left">Тип кузова:<br />
  32. <input type="text" name="tip" size="10" maxlength="20" />
  33. </td>
  34. </tr>
  35. <tr>
  36. <td align="left">Цвет авто:<br />
  37. <input type="text" name="color" size="10" maxlength="20" />
  38. </td>
  39. </tr>
  40.  <tr>
  41. <td align="left">Тариф:<br />
  42. <input type="text" name="tariff" size="10" maxlength="20" />
  43. </td>
  44. </tr>
  45. <tr>
  46. <td align="left">Срок стоянки:<br />
  47. <input type="text" name="srok" size="10" maxlength="20" />
  48. </td>
  49. </tr>
  50. <tr>
  51. <td align="left">Общая стоимость:<br />
  52. <input type="text" name="stoimost" size="10" maxlength="20" />
  53. </td>
  54. </tr>
  55. <tr>
  56. <td align="left">Расположение(этаж):<br />
  57. <input type="text" name="raspolojenie" size="10" maxlength="20" />
  58. </td>
  59. </tr>
  60.  <tr>
  61. <td align="left">Место №:<br />
  62. <input type="text" name="opisanie" size="10" maxlength="20" />
  63. </td>
  64. </tr>
  65. <td align="center">
  66. <input type="submit" name="do" value="зарегать" />
  67. </td>
  68. </tr>
  69. </table>
  70. </form>
  71.  

AND get2.php
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.   if(isset($_POST['do'])){
  3. $connect = mysql_connect("localhost","root","");
  4. mysql_select_db("phplogin");
  5. $fio=$_POST['fio'];
  6. $pasnomer=$_POST['pasnomer']
  7. $telnomer=$_POST['telnomer']
  8. $avtonomer=$_POST['avtonomer']
  9. $marka=$_POST['marka']
  10. $tip=$_POST['tip']
  11. $color=$_POST['color']
  12. $tariff=$_POST['tariff']
  13. $srok=$_POST['srok']
  14. $stoimost=$_POST['stoimost']
  15. $raspolojenie=$_POST['raspolojenie']
  16. $opisanie=$_POST['opisanie']
  17. $query="INSERT INTO users SET fio='$fio',avtonomer='$avtonomer' ON DUPLICATE KEY UPDATE fio='$fio',avtonomer='$avtonomer' ";
  18. mysql_query($query,$connect)
  19. $query="INSERT INTO avto SET marka='$marka',tip='$tip',color='$color' ON DUPLICATE KEY UPDATE marka='$marka',tip='$tip',color='$color' ";
  20. mysql_query($query,$connect)
  21. $query="INSERT INTO fio SET telnomer='$telnomer',pasnomer='$pasnomer' ON DUPLICATE KEY UPDATE telnomer='$telnomer',pasnomer='$pasnomer' ";
  22. mysql_query($query,$connect)
  23. $query="INSERT INTO propusk SET tariff='$tariff',srok='$srok',stoimost='$stoimost' ON DUPLICATE KEY UPDATE tariff='$tariff',srok='$srok',stoimost='$stoimost' ";
  24. mysql_query($query,$connect)
  25. $query="INSERT INTO raspolojenie SET raspolojenie='$raspolojenie',opisanie='$opisanie' ON DUPLICATE KEY UPDATE raspolojenie='$raspolojenie',opisanie='$opisanie' ";
  26.  mysql_query($query,$connect)
  27.  
  28. }
  29. ?>
  30.  

THANKS TO Atli , the code working now

one more lil'question :

how to do that :
when I write all forms , press submit , all data already goes to my DB , how can I show all details that I just enter to my DB ? on get2.php ?))

sorry for my bad english ='((
Sep 25 '10 #1
4 3392
Atli
5,058 Recognized Expert Expert
Hey.

Every line in a PHP script must end with a semi-colon (;). They are missing from all lines in you get2.php script from line #6 and down.
Sep 25 '10 #2
9139530
4 New Member
I forgot this , thanx)))(not see xD)
but now new error

Parse error: syntax error, unexpected T_VARIABLE in Z:\home\baza\ww w\get2.php on line 19
Sep 25 '10 #3
9139530
4 New Member
Ohh man , in that i forgot (;) too ... everithing working , thanks ))
Sep 25 '10 #4
9139530
4 New Member
And man , one more question , how to do that :
when I write all forms , press submit , all data already goes to my DB , how can I show all details that I just enter to my DB ? on get2.php ?))

sorry for my bad english ='((
Sep 25 '10 #5

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

Similar topics

8
46199
by: Wescotte | last post by:
The error message Parse error: syntax error, unexpected $end in FILE on line X is one I run into frequently and I know the cause is I missed an ending quote. Is there an easy way to determine where the inital " started? I find myself adding /* */ blocks or cutting/pasting sections of code out in order to find where the error occured. Wouldn't it it be nice if the warning message included the line in teh source where the initial quote ...
3
6951
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
3246
by: fburn | last post by:
I need some help with an error I'm getting using php 5.2.5 running on linux. I receive an error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /var/www/html/inventoryControl/supplier.php on line 26 (line number changed to match code tags) The code is as follows: // get a supplier using the supplier id
4
3338
by: Graviz | last post by:
I am gettin a error message on this script can someone help me. I can't see what is wrong. Thanks in advance for any help you can give me. here is the error and code. Parse error: syntax error, unexpected T_VARIABLE in /home/a4284579/public_html/contactformphp.php on line 27 <?php /* Subject and Email Variables*/ $emailSubject = 'Client Information Scripting!';
3
5201
by: brkseven | last post by:
Looking for help with this Contact Form. The error is on line 1, but that' doesn't mean a lot, I think. In fact, a php syntax check passed it, but I was hoping for an easy syntax error, it looks more complicated now. Anyway, here's the error: "Parse error: syntax error, unexpected T_VARIABLE in /home/xxx/public_html/yyy/zzz/contactengine.php on line 1" It's a contact form from css-tricks, when I submit that's what I get.
5
2867
by: Mandyrjs | last post by:
hi im new to php and i want to code a admin login page where i want to match the values from the login form with the values of the database table.....when i run the login page after entering the user name and the password i've got a Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\php\validate.php on line 16. Can anybody please help me to slove this matter. validate.php <?php session_start(); $username= $_POST; $password=...
1
3430
by: Carrie Kemp | last post by:
I am having an error that reads the code that is in question is: $list_data->save($dataFile); How would I fix this?
3
3870
by: Neil Playdon | last post by:
Hi there, this is my first ever post so please go easy on me. I am currently getting the following error message "Parse error: syntax error, unexpected T_VARIABLE in /home/where2st/public_html/admin/editvenue_script.php on line 110" Code is attached Thanks in advance for any help.
3
3358
by: SUNN | last post by:
Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in /Users/Sunn/Song/usersong/profile.php on line 113 This is the line 113 <script src=\"<?=$jspath?>moderate.js?<?=VERHASH?>\" type=\"text/javascript\"></script> <? } ?> Pls help me to correct this error, thanks alot.
0
9541
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
10482
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
10225
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
9072
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
7564
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
6805
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();...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4139
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
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.