Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Outdated code?

0 views
Skip to first unread message

BK

unread,
Mar 8, 2003, 2:22:06 PM3/8/03
to
Can anyone tell me what is wrong with this code? It worked fine before I updated my PHP to 4.3.1


<?
$to = "m...@mycute.com";             //Destination Email ID
$name = $name;            //Name of the Person
$email = $email;        //Email Id of the person
$feedback = $feedback;        //Feedback detail

$subject = "Feedback Form"." "."$email";  //Subject line of the email

/*********** Email body *******************/

$matter = "Below are the details sent by"." "."$name"."\n".   
       "Name"." "."$name"."\n".
       "Email"." "."$email"."\n".
       "Feedback"." "."$feedback"."\n";

/**********************************************/       
       

mail("$to", "$subject","$matter","From: $email");
?>

<>

unread,
Mar 8, 2003, 3:16:56 PM3/8/03
to
Outdated code?> "BK" <bi...@keyworthgraphics.com> wrote in message
news:BA8FAD0E.40AE%bi...@keyworthgraphics.com...

> Can anyone tell me what is wrong with this code? It worked fine before I
updated
> my PHP to 4.3.1
>
>
> <?
> $to = "m...@mycute.com"; //Destination Email ID
> $name = $name; //Name of the Person
> $email = $email; //Email Id of the person
> $feedback = $feedback; //Feedback detail
>
> $subject = "Feedback Form"." "."$email"; //Subject line of the email
>

Did your script receive these variables via POST or GET?

If so, look here:
http://www.php.net/manual/en/reserved.variables.php
http://www.php.net/manual/en/security.registerglobals.php

BK

unread,
Mar 8, 2003, 3:26:19 PM3/8/03
to
I have a feedback form that's on a swf file. It sends variables to a
mailto.php file (note code I pasted from before, below) that sends me an
email with the variables in the fields of the email message. It worked
before I updated...

As far as

> Did your script receive these variables via POST or GET?

I don't know which file to look at to find this method of delivery.

Thanks for your time,
Billy


On 3/8/03 3:16 PM, in article Ycsaa.50985$zb.15...@twister.socal.rr.com,

<>

unread,
Mar 8, 2003, 3:52:51 PM3/8/03
to
"BK" <bi...@keyworthgraphics.com> wrote in message
news:BA8FBC1B.40B8%bi...@keyworthgraphics.com...

> I have a feedback form that's on a swf file. It sends variables to a
> mailto.php file (note code I pasted from before, below) that sends me an
> email with the variables in the fields of the email message. It worked
> before I updated...
>
> As far as
> > Did your script receive these variables via POST or GET?
> I don't know which file to look at to find this method of delivery.
>

It will be in plain HTML, within the feedback form page. Look for a tag
like...
<form action="mailto.php" method="POST">

I f method is POST or GET, then previous advice applies.


BK

unread,
Mar 8, 2003, 5:22:26 PM3/8/03
to
It's a .swf (flashplayer) file I can get you the actionscript for the submit
button?


On 3/8/03 3:52 PM, in article DKsaa.50995$zb.15...@twister.socal.rr.com,

BK

unread,
Mar 8, 2003, 8:56:32 PM3/8/03
to
Please refer to this link. It's where the info on this page comes from:
http://www.entropy.ch/software/macosx/php/

He writes this about the upgrade I used, and I don't know how to get back...

"NOTE regarding PHP versions 4.2.x and above: If your PHP scripts cease to
work after upgrading to 4.2.x, the problem is most likely with my module.
There have been many changes in PHP 4.2.x and you need to read the
http://www.php.net/release_4_2_1.php release announcement and the
http://www.php.net/manual/en/language.variables.predefined.php explanations
on the PHP site very carefully. You will probably have to change many small
things in your code, I know that I had to update every single one of my PHP
pages. Do not write me if your variables/data are not passed from page to
page!"

Still needing help...
Billy


On 3/8/03 3:52 PM, in article DKsaa.50995$zb.15...@twister.socal.rr.com,
"<>" <loop...@44.255.255.255> wrote:

BK

unread,
Mar 10, 2003, 10:53:47 AM3/10/03
to
This is a swf file that is sending those parameters. All the other php files
in this directory work...so I am thinking it has something to do with the
way my server is configured to send this to my email via my ISP's SMTP
address...ugh, still befuddled in Vermont
Billy


On 3/8/03 3:52 PM, in article DKsaa.50995$zb.15...@twister.socal.rr.com,
"<>" <loop...@44.255.255.255> wrote:

Charles Sweeney

unread,
Mar 10, 2003, 11:11:12 AM3/10/03
to
"BK" <bi...@keyworthgraphics.com> wrote in message
news:BA8FAD0E.40AE%bi...@keyworthgraphics.com...

Looks like a register_globals issue. You need to use predefined variables
as below:

If request method is post:

$to = "m...@mycute.com"; //Destination Email ID

$name = $HTTP_POST_VARS['name']; //Name of the Person
$email = $HTTP_POST_VARS['email']; //Email Id of the person
$feedback = $HTTP_POST_VARS['feedback']; //Feedback detail

If it's get:

$to = "m...@mycute.com"; //Destination Email ID

$name = $HTTP_GET_VARS['name']; //Name of the Person
$email = $HTTP_GET_VARS['email']; //Email Id of the person
$feedback = $HTTP_GET_VARS['feedback']; //Feedback detail

Just a point. You can also use $_POST['name'] or $_GET['name'] but older
versions of PHP will not recognise this.
--
Charles Sweeney


BK

unread,
Mar 10, 2003, 11:47:10 AM3/10/03
to
Ok, I edited the php.ini file to turn these "ON" so I need to edit all my
php files that send info to like what you have posted? I thank you from from
the bottom of my heart for showing this to me!
I still am in question about the GET and POST methods and where I would find
these... I have "actionscript" on a flash button to submit the info to a php
file which sends it to my ISP, which in turns sends me an email with those
variables on it...so it might be in there?

On 3/10/03 11:11 AM, in article b4ide4$209j0t$1...@ID-162618.news.dfncis.de,

BK

unread,
Mar 11, 2003, 10:16:53 PM3/11/03
to
Ok, so in order for me to use the old code, I had to turn on
register_globals in the php.ini file. They shipped this version of php with
them off by default because of what I heard was a security hole or
something? Can someone explain to me why this is not a good idea to run my
server with register_globals on?


On 3/10/03 11:11 AM, in article b4ide4$209j0t$1...@ID-162618.news.dfncis.de,
"Charles Sweeney" <m...@charlessweeney.com> wrote:

0 new messages