473,411 Members | 2,285 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

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

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

with this code (have 2 pages , html-from page (reguser.php) and php(get2.php))work 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 3365
Atli
5,058 Expert 4TB
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
I forgot this , thanx)))(not see xD)
but now new error

Parse error: syntax error, unexpected T_VARIABLE in Z:\home\baza\www\get2.php on line 19
Sep 25 '10 #3
Ohh man , in that i forgot (;) too ... everithing working , thanks ))
Sep 25 '10 #4
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
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...
3
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...
2
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...
4
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,...
3
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...
5
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...
1
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
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...
3
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
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...
0
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,...

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.