Closed Thread Icon

Topic awaiting preservation: php email script (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12539" title="Pages that link to Topic awaiting preservation: php email script (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: php email script <span class="small">(Page 1 of 1)</span>\

 
Ultrakapy
Obsessive-Compulsive (I) Inmate

From:
Insane since: Aug 2002

posted posted 12-03-2002 04:24

I have a contact form that uses a php script to send me and email of the form info, but each time I submit the form the following message is displayed:

"Warning: <?php_track_vars?> is no longer supported - please use the track_vars INI directive instead..."

How do I fix this? Here is my entire script for reference:

<?php_track_vars?>
<?php

$msg .= "Sender's Full Name:\t$sender_name\n";
$msg .= "Sender's Email:\t$sender_email\n";
$msg .= "Did you like this site?\t$like_site\n";
$msg .= "Comments/Questions:\t$message\n\n";

$mailheaders = "From: My Web Site\n";
$mailheaders .= "Reply-To: $sender_email\n\n";

mail("kapambwe@hotmail.com", "Feedback Form", $msg, $mailheaders);

echo "<h1 align='center'>Thank You, $sender_name</h1>";
echo "<p align='center'>I appreciate your feedback</p>";

?>

Gweilo
Bipolar (III) Inmate

From: switzerland
Insane since: Sep 2002

posted posted 12-03-2002 08:31

You can enable php_track_vars in your php.ini file in the section "Data Handling".

I'm not quite sure, but I assume your php version lately changed from V < 4.1 to V > 4.1, right?

That's because you have to access the post variable differently in the new versions (security reasons). Now you can access them with:
$_POST['varname']
or $_GET['varname'] for URL-passed variables. Just save them in new variables, like this:

$sender_name = $_POST['sender_name'];

Ultrakapy
Obsessive-Compulsive (I) Inmate

From:
Insane since: Aug 2002

posted posted 12-03-2002 20:37

So I don't need the <?php_track_vars?> at all??

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 12-03-2002 21:52

Geez I never even knew that existed.

heh

No you shouldn't need that. Normally if track vars is set in the ini file you will have automatic access to those variables best practice however is to just use the $_POST and $_GET variables.



.:[ Never resist a perfect moment ]:.

Ultrakapy
Obsessive-Compulsive (I) Inmate

From:
Insane since: Aug 2002

posted posted 12-03-2002 23:12

Ok. Thanks.

« BackwardsOnwards »

Show Forum Drop Down Menu