473,406 Members | 2,387 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,406 software developers and data experts.

Connecting database and html form brings an unexpected error

When I try to submit my form data,I get this error, ( ! ) Parse error: syntax error, unexpected '$rnum' (T_VARIABLE) in C:\wamp64\www\web\insert.php on line 41

This is the part that seems to have an issue. Kindly help:
Expand|Select|Wrap|Line Numbers
  1. //prepare statements
  2. $stmt=$conn->prepare($SELECT);
  3. $stmt->bind_param("s", $email);
  4. $stmt->execute();
  5. $stmt->bind_result($email);
  6. $stmt->store_result
  7. $rnum = $stmt->num_rows;
  8.  
  9. if($rnum==0){
  10.     $stmt->close();
  11.     $stmt->$conn->prepare($INSERT);
  12.     $stmt->bind_param("ssssii", $username, $password, $gender, $email, $phoneCode, $phone);
  13. $stmt->execute();
  14. echo "New record inserted succesfully.";
Nov 12 '18 #1
1 1848
Rabbit
12,516 Expert Mod 8TB
Please use code tags when posting code or formatted data.

You need to tell us which line is line 41. But it's probably line 6 or 7 above that is your line 41. You're missing a semi-colon.
Nov 13 '18 #2

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

Similar topics

3
by: sammmista | last post by:
hello experts, Plz dont treat this as another newbie query , i did my homework but still getting nowhere :( :( :( Trying to learn PHP on Fedora core 1 (PHP 4.3,MySQL,HTTPD).Unable to post data...
1
by: Angel | last post by:
I'm trying to connect to a fixed IP address (eg. http://10.60.903.50/TempFile) in order to retrieve one accii line of text in TempFile. I try to read the information with this code: string...
1
by: Ben | last post by:
Hi All, Have you ever experience the situation when designing a WebForm: Switching between "Design" and "HTML" view sometime and you get an error message about Internet Explore, then the...
11
by: MLH | last post by:
Private Sub ButtonP_Click() On Error GoTo Err_ButtonP_Click Dim ThisForm As String ThisForm = Me.Name Exit_ButtonP_Click: Exit Sub Err_ButtonP_Click: Dim r As String, k As String, Message3...
3
by: ielamrani | last post by:
istone (IS/IT--Management) Mar 1, 2007 Hi All, I have a button in a form with the following code: te Sub CmdGo_Click() On Error GoTo Err_CmdGo_Click Dim stDocName As String ...
5
by: keeps21 | last post by:
A little problem I've run into is the following. I have a script that allows a user to edit a story. I have an HTML form for title and main_text which gets it's values by pulling the selected...
1
by: anusha77 | last post by:
Hi, Im so new to webdevelopment. I have a html form, on which the user submit his/her details, the information has to go to an access database. how do i do teh asp coding for that. Please guide me....
1
by: subratamaji | last post by:
Hi, I am trying to open the form from the project explorer( Visual basic 6.0 ) by double clicking on a particular form ( frmDispatchEntry ) I am getting the :- RUN-TIME ERROR 50001...
2
by: ryan0026 | last post by:
Hi im having a proble with this code, please can someone help it says unexpected error on line 5, event = Replace(Server.HTMLEncode(Request.Form("event")),"'","''") thanks in advance here is...
1
AdminCyn
by: AdminCyn | last post by:
I am working on a project to update our website functionality; mainly I am suppose to create an HTML form for prospective tenants to fill out and submit via email; I have the html form done and...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
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...

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.