View Full Version : What's wrong with this line of code?
gyrbo
May 25th, 2001, 09:43
Like in the subject:
$tmp001='<a href=\"cgi-bin/bpjoin.cgi?new\">Registreren</a>';
lucifer
May 25th, 2001, 09:56
$tmp001='<a href=\"cgi-bin/bpjoin.cgi?new\">Registreren</a>'
you only use the in " " not ' '
gyrbo
May 25th, 2001, 10:05
Nope it doesn't work.
lucifer
May 25th, 2001, 10:13
what's the problem error?
and surrounding code - few lines before
gyrbo
May 25th, 2001, 10:20
<?php
//function db_connect
$s32_db = mysql_connect("localhost", "root","xxxxx");
mysql_select_db("sitewm",$s32_db);
//
function add_page($id,$title,$nav,$text)
{
$sql = "INSERT INTO s32_main (id,title,nav,text) VALUES ('$id','$title','$nav','$text')";
$result = mysql_query($sql);
echo $result;
}
add_page("0","Startpagina","","Welkom bij Site 32")
$tmp001='<a href="cgi-bin/bpjoin.cgi?new">Registreren</a>';
$tmp002='Omdat er slechts weinig Banner Exchanges zijn die enkel op Belgishe site gericht zijn, heb ik besloten om er zelf maar een te maken.';
add_page("1","Banner Exchange",$tmp001,$tmp002)
?>
And the error code is:
Parse error: parse error in d:/www/docs/site-32/add.php on line 16
lucifer
May 25th, 2001, 10:27
add_page("0","Startpagina","","Welkom bij Site 32");
$tmp001='<a href="cgi-bin/bpjoin.cgi?new">Registreren</a>';
$tmp002='Omdat er slechts weinig Banner Exchanges zijn die enkel op Belgishe site gericht zijn, heb ik besloten om er zelf maar een te maken.';
add_page("1","Banner Exchange",$tmp001,$tmp002);
often the errors are on a different line if you miss ; or " etc
gyrbo
May 25th, 2001, 10:31
Thanks for your halp, but nothing solved the problem. Instead, I just made an SQL file and readed it into the db via phpMyAdmin. And it worked.
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.