Page 1 of 1
prob in php
Posted: Thu Feb 06, 2003 11:18 am
by forgun
Code: Select all
<?php
if ($type == "dl") {
foreach ($kays as $count => $tkay) {
foreach ($path as $count2 => $tpath) {
for ($i = 0; $i <= $count; $i++) {
$qur = "INSERT INTO linkssets (kayword , path , type , ip) VALUES (";
$qur .= "'" .mysql_escape_string($tkay) . "' , '" .mysql_escape_string($_SERVER['HTTP_HOST'] .$tpath) . "' , 'dl' , '" .$ip ."')";#the error line no mysql error is show
mysql_query($qur) or die (mysql_error());
}
}
}
}
?>
i try to see what is the prob here and i didnt find i have an error that the data in not pass to the db at all
Re: prob in php
Posted: Thu Feb 06, 2003 8:33 pm
by patrikG
What exactly did the error-message say?
Posted: Thu Feb 06, 2003 11:59 pm
by volka
You might add html-comments to check what should have been added to your database.
Code: Select all
// the error line no mysql error is show
echo '<!-- ', htmlentities($qur), "-->\n";
mysql_query($qur) or die (mysql_error());
These lines will not appear within the rendered document but in the browser's source view, so they do not break down your layout (only if you're trying to send headers afterwards)