Mikä on vialla skriptissä kun painaa lähetä niin form menee perille mutta thank you sivun yläreunassa lukee muun tekstin lisäksi seuraavaa:
Warning: reset(): Passed variable is not an array or object in /var/www/customers/nemusachievementcom/
Warning: Variable passed to each() is not an array or object in /var/www/customers/nemusachievementcom/
Ja itse skripti menee seuraavasti:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
<meta http-equiv="REFRESH" content="8; url=http://www.xxxxxxxxxxxxxxxxx.xxx/xxxxxx.htm">
<style>
BODY
{
font-size: 12px;
color: #000;
font-weight:bold;
font-family: Verdana, Arial;
background-color: #ffffff;
}
.tekstb
{
font-size: 14px;
color: #000;
font-family: Verdana, Arial;
background-color: #ffffff;
font-weight:bold;
}
.tekste
{
font-size: 11px;
color: #000;
font-family: Verdana, Arial;
background-color: #ffffff;
font-weight:normal;
}
.style24 {font-size: 11px}
</style>
<title>Thank you!</title>
</head>
<body>
<script language="php">
$email = $HTTP_POST_VARS[email];
$mailto = "xxxx@xxxxxxxxxxxxxxxx.com";
$mailsubj = "Form submission";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form:\n";
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
$mailbody .= "$key : $val\n"; }
mail($mailto, $mailsubj, $mailbody, $mailhead);
</script>
<table align="center" border="0" width="800">
<tbody>
<tr>
<td>
<table border="0" width="800">
<tbody>
<tr>
<td> </td>
</tr>
<tr>
<td>
<table align="center" border="0" width="500">
<tbody>
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center">
<p class="tekstb" align="center">Kiitos yhteydenotostanne!
</p>
<p>Otamme teihin yhteyttä mahdollisimman pian! </p>
<p>Ystävällisin terveisin,<br>
xxxxxxxxxx xxxxxxxxx</p>
<p class="tekste"> 10 sekunnin päästä siirrytte automaattisesti takaisin pääsivullemme.</p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>Liekkö vika siinä, että jos on tarpeeksi uusi PHP:n versio, ei toi $HTTP_POST_VARS ole enää käytössä php:n asetuksista riippuen. Eli muuta tuo (kaikkiin kohtiin) muotoon $_POST.
Se on helppoo kun tietää... Kiitos tästä. Nyt toimii hienosti!
Vielä minäkin joskus... =)
Aihe on jo aika vanha, joten et voi enää vastata siihen.