Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with Mail and PHP.ini

Status
Not open for further replies.

Siberd

Technical User
Jun 24, 2001
35
US
Hi ya again folks. I'm having issues with mail(). i think its more down to my php.ini (which i can't find!). I'm using omnihttpd pro to execute my scripts, and can't for the life oe work out where its put php.ini. its running on a XP home box at the moment. does anyone have any suggestions as to where it might be? or is there another way to send mail from a PHP script? any help greatfully apreicated
Cheers.

/Sib
programmer in the making
 
Good news? I successfully installed the newer PHP files, from PHP.net. Yay! it let me set my smtp server during the setup, great news i hear you cry!
not so fast. Now, it doesn't automatically take the query varibles as their form element names (for example a text field named uname, is no longer accesable in the script as $uname) HELP! lol.

Cheers.

/Sib
programmer in the making
 
Quick update:
Issue resolved.

$split_on_and = explode("&", $HTTP_SERVER_VARS{'QUERY_STRING'});
for($i=0;$i<count($split_on_and);$i++)
{
$split_on_eq = explode(&quot;=&quot;, $split_on_and[$i]);
$$split_on_eq[0] = $split_on_eq[1];
}

drags the inputs from the query string, splits em at the & and then dumps the array into a for loop, thus producing for each of the solts, another split, spliting it at the and, and making the first half of the split, the varibale name, so for a querey string resembling &quot;uname=siber&password=mepassword&quot; (no, its not, lol) you would see:
$split_on_and[0] uname=siber
$split_on_and[1] password=mepassword
$split_on_eq[0] (first run of the for loop) uname
$split_on_eq[1] (first run of the for loop) siber
$uname siber
magic eh?
implimented from an old script i developed in perl and year or two ago.
Cheers.

/Sib
programmer in the making
 
you have to setup your php.ini that is in the c:\windows or c:\winnt

you must set the param register_globals to yes

Look, this is a security breach. i advise you to ask your ISP if the register_globals is set to yes or no.

if it is set to no, you must replace all the form vars by $_GET[varname] or $_POST[varname] deppending on the method of the form. Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
I am my ISP :)
thanks for the tip
Cheers.

/Sib
programmer in the making
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top