Habe folgendes Skript:
<?php
include "db_init.php";
if (isset ($cookie)) {
$result = mysql_query("
SELECT partners_id FROM partners WHERE friends_id = $cookie[userid] AND ((ISNULL(firstname)) OR (ISNULL(surname)) OR (ISNULL(female)))
");
if ($result && mysql_num_rows($result) > 0) {
while($get_info = mysql_fetch_array($result)){
$id=$get_info[0];
$firstname="firstname_$get_info[0]";
$surname="surname_$get_info[0]";
$email="email$_get_info[0]";
$female="female_$get_info[0]";
$value=$$firstname;
if(isset($$firstname)){
$query="UPDATE `partners` SET `firstname`='$value', `updated`=NOW() WHERE `partners_id`='$id'";
$result = mysql_query($query);
echo("$query<br>");
}
$value=$$surname;
if(isset($$surname)){
$query="UPDATE `partners` SET `surname`='$value', `updated`=NOW() WHERE `partners_id`='$id'";
$result = mysql_query($query);
echo("$query<br>");
}
$value=$$email;
if(isset($$email)){
$query="UPDATE `partners` SET `partners_email`='$value', `updated`=NOW() WHERE `partners_id`='$id'";
$result = mysql_query($query);
echo("$query<br>");
}
$value=$$female;
if(isset($$female)){
$query="UPDATE `partners` SET `female`='$value', `updated`=NOW() WHERE `partners_id`='$id'";
$result = mysql_query($query);
echo("$query<br>");
}
}
}
} else {
include("index.html");
}
?>
Jedesmal wenn ein if statement true returns hoert der while loops auf zu laufen. Habe schon zwei Tage verschwendet und nichts gefunden. Any help greatly welcome!!!!!!!!!!!
<?php
include "db_init.php";
if (isset ($cookie)) {
$result = mysql_query("
SELECT partners_id FROM partners WHERE friends_id = $cookie[userid] AND ((ISNULL(firstname)) OR (ISNULL(surname)) OR (ISNULL(female)))
");
if ($result && mysql_num_rows($result) > 0) {
while($get_info = mysql_fetch_array($result)){
$id=$get_info[0];
$firstname="firstname_$get_info[0]";
$surname="surname_$get_info[0]";
$email="email$_get_info[0]";
$female="female_$get_info[0]";
$value=$$firstname;
if(isset($$firstname)){
$query="UPDATE `partners` SET `firstname`='$value', `updated`=NOW() WHERE `partners_id`='$id'";
$result = mysql_query($query);
echo("$query<br>");
}
$value=$$surname;
if(isset($$surname)){
$query="UPDATE `partners` SET `surname`='$value', `updated`=NOW() WHERE `partners_id`='$id'";
$result = mysql_query($query);
echo("$query<br>");
}
$value=$$email;
if(isset($$email)){
$query="UPDATE `partners` SET `partners_email`='$value', `updated`=NOW() WHERE `partners_id`='$id'";
$result = mysql_query($query);
echo("$query<br>");
}
$value=$$female;
if(isset($$female)){
$query="UPDATE `partners` SET `female`='$value', `updated`=NOW() WHERE `partners_id`='$id'";
$result = mysql_query($query);
echo("$query<br>");
}
}
}
} else {
include("index.html");
}
?>
Jedesmal wenn ein if statement true returns hoert der while loops auf zu laufen. Habe schon zwei Tage verschwendet und nichts gefunden. Any help greatly welcome!!!!!!!!!!!
Kommentar