Hello, please if u can help me, I am working on project developing a website.
I write the sign up page but the server gives me a parse error. please notify what it is? - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
<?php
-
$fname=$_POST["nom"];
-
$lname=$_POST["prenom"];
-
$pname=$_POST["perenom"];
-
$ddn=$_POST["dob"];
-
$tel=$_POST["phone"];
-
$ema=$_POST["mail"];
-
$vil=$_POST["ville"];
-
$ru=$_POST["rue"];
-
$imm=$_POST["immeuble"];
-
$idc=$_POST["idcard"];
-
$pofs=$_POST["pps"];
-
$uname=$_POST["userNom"];
-
$pwd=$_POST["pass"];
-
include("MySQLConnection.php");
-
$insert="INSRET INTO etudiante values(", "$fname", "$lname", "$pname", "$ddn", "$tel", "$ema", "$vil", "$ru",
-
"$imm", "$idc", "$pofs","$uname", MD5('$pwd'))";
-
$result= mysql_query($insert);
-
if($result)
-
{
-
header("Location:Acceptance.php");
-
}
-
else
-
{
-
echo("You have missing or wrong input infomation". mysql_error());
-
}
-
mysql_close();
-
?>
thanks for your help
5 1345
i know the error in this line but what is it? and why??
Hi
Please check you query. There is an inverted comma mis use problem. Use the following query:
$INSERT = "INSRET INTO etudiante values('', '$fname', '$lname', '$pname', '$ddn', '$tel', '$ema', '$vil', '$ru', '$imm', '$idc', '$pofs', '$uname', 'MD5($pwd)')";
I will definitely works.
Even though the answer is given, I want to suggest a little to developer...
you have used 12 post value -
-
$fname=$_POST["nom"];
-
$lname=$_POST["prenom"];
-
...
-
...
-
The fact that is interesting is you have used in every case post data name and php variable name is different. Of course nothing wrong with that.
but if you use same name in the both field that is very helpful -
-
$fname=$_POST["fname"];
-
$prenom=$_POST["prenom"];
-
...
-
...
-
I have seen when number of data increase(in your case 12) its become difficult to handle all data specially when you would discover that you have misused a varisble.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: AIM |
last post by:
Error in msvc in building inheritance.obj to build hello.pyd
Hello,
I am trying to build the boost 1.31.0 sample extension hello.cpp.
I can not compile the file inheritance.cpp because the two...
|
by: Andy Sutorius |
last post by:
Has anyone successfully created a Hello World program without using Visual
Studio.NET? If so, what IDE did you use and what namespaces did you import?
Thanks!
Andy Sutorius
|
by: bissatch |
last post by:
Hi,
I am trying to use JavaScript to write a table column on a web page.
The code is as follows:
<html>
<head>
<script>
function displaycount() {
|
by: Daniel Crespo |
last post by:
Is there a built-in method for transforming (1,None,"Hello!") to
1,None,"Hello!"?
Thanks
|
by: fei.liu |
last post by:
Consider the following sample code
char * ptr = "hello";
char carray = "hello";
int main(void){
}
What does the standard have to say about the storage requirement
about ptr and carray? Is...
|
by: arnuld |
last post by:
i am learning C and doing the exercise 1-1 of K&R2, where K&R ask to
remove some parts of programme and experiment with error, so here i
go:
#include <stdio.h>
int main () {
printf('hello...
|
by: James T. Dennis |
last post by:
You'd think that using things like gettext would be easy. Superficially
it seems well documented in the Library Reference(*). However, it can
be surprisingly difficult to get the external details...
|
by: devito |
last post by:
hi there,
for some days i try to build the boost.python tutorial "hello world"
without bjam on winxp by using mingw.
so i wrote a *.bat-file like the following:
// --- snip...
|
by: Nepomuk |
last post by:
Hi everybody!
As was suggested here, today should be Hello World Day! So, here's my Hello World Program in bash script:
#!/bin/bash
i=0;
function hello {
case $i in
0)
echo 'H'
i=`expr...
|
by: tosreejithp |
last post by:
Hi,
My first problem was i am not able to compiled a file from java script to java class.Now its clear and working fine..now i can convert a java script file to java class by Rhino Java Script...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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...
|
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...
|
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,...
|
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...
|
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...
|
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...
|
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,...
| |