|
-
Aug 3rd, 2001, 04:18 AM
#1
Thread Starter
Member
Parse error.
Code:
10. <?
11. IF ($submit")
13. $host = "www.freesql.org";
14. $user = "mobic";
15. $pass = "*";
16. {mysql_pconnect ("$host","$user","$pass");
17. mysql_select_db("war");
18. $sql = "insert into brukere(fornavn, etternavn, brukernavn, 19. passord) values ('$fornavn','$etternavn', '$brukernavn', '$passord')";
20. $result = mysql_query($sql);
21. $ID = mysql_insert_id();
22. Print("Konto opprettet!");
23. ?>
From this I get:
Parse error: parse error in /register.php on line 11
-
Aug 3rd, 2001, 04:20 AM
#2
-
Aug 3rd, 2001, 04:23 AM
#3
Thread Starter
Member
I've tried that, but then i got the same error on line 26, and there is only 25 lines.
-
Aug 3rd, 2001, 04:30 AM
#4
post the rest of your code then....
-
Aug 3rd, 2001, 08:13 AM
#5
Thread Starter
Member
[code]
<html>
<head></head>
<body><form method="post" action="registrer.php">
Fornavn: <input type="text" name="fornavn"><br>
Etternavn: <input type="text" name="etternavn"><br>
Brukernavn: <input type="text" name="brukernavn"><br>
Passord: <input type="text" name="passord"><br>
<input type="Submit" name="submit" value="Registrer"><br> </form>
<?
IF ("$submit")
$host = "www.freesql.org";
$user = "mobic";
$pass = "*";
{mysql_pconnect ("$host","$user","$pass");
mysql_select_db("war");
$sql = "insert into brukere(fornavn, etternavn, brukernavn, passord) values ('$fornavn','$etternavn', '$brukernavn', '$passord')";
$result = mysql_query($sql);
$ID = mysql_insert_id();
Print("Konto opprettet!");
?>
</body>
</html>
-
Aug 3rd, 2001, 06:44 PM
#6
try this
PHP Code:
IF ("$submit") {
$host = "www.freesql.org";
$user = "mobic";
$pass = "*";
{mysql_pconnect ("$host","$user","$pass");
mysql_select_db("war");
$sql = "insert into brukere(fornavn, etternavn, brukernavn, passord) values ('$fornavn','$etternavn', '$brukernavn', '$passord')";
$result = mysql_query($sql);
$ID = mysql_insert_id();
Print("Konto opprettet!");
}else{
print"what ever you want to do if it was not submit";
}
it looks like it was looking for something else. try that code
-
Aug 4th, 2001, 09:02 AM
#7
Fanatic Member
Shouldn't there be a closing } somewhere after this line?
{mysql_pconnect ("$host","$user","$pass");
-
Aug 4th, 2001, 10:38 AM
#8
Thread Starter
Member
Thanks, it works fine now
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|