Help, please - Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Webmaster Tech > Programming > PHP Development

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 01-20-2009, 10:02 AM   #1 (permalink)
Junior Member
 
interval's Avatar
 
Join Date: Dec 2008
Posts: 15
Default Help, please

It is for the first time I run a php script on my site 4myown.biz. This script help visitors to submit link exchange proposals. The form that activates this script is on 4myown.biz/add-site.php, and the script on submit_link.php

The script verify if variable name has two words and if variable email is like xxx@yyy.zzz and and nothing more. When I fill the form and submit the script shows the message that name has not two words and email is not in standard form. It seems that script is not working at all. Because is the first time I run a script I uploaded a file php.ini containing just 'register_globals = on' (without ' )

I use the same script on other websites and run corectly. This time I just changed few variable names and recipient (mailbox).

Please help me to fix it.
Advanced thanks for your time and attention
interval is offline   Reply With Quote
Sponsored Links
Old 02-10-2009, 04:14 AM   #2 (permalink)
Junior Member
 
BlueBoden's Avatar
 
Join Date: Feb 2009
Posts: 53
Default Re: Help, please

You should really post some code we can have a look at.
BlueBoden is offline   Reply With Quote
Old 02-10-2009, 11:43 AM   #3 (permalink)
Junior Member
 
interval's Avatar
 
Join Date: Dec 2008
Posts: 15
Default Re: Help, please

Quote:
Originally Posted by BlueBoden
You should really post some code we can have a look at.
Here it is (real email address replaced with aa@bb.ccc)
You may see and
add submit your site website improve search engine ranking

<?php
$status = "OK";
$msg="";
$wmaster = "aa@bb.ccc";

if (strlen($realname) <2 ) { // checking your name
$msg .="Please enter your first and second name<BR>";
$status= "NOTOK";}

if (!stristr($email,"@") OR !stristr($email,".")) { // checking friends email
$msg .="Your Friends address is not correct<BR>";
$status= "NOTOK";}


if($status=="OK"){ // all validation passed
/////////// Sending the message starts here //////////////
$ref=@$HTTP_REFERER;
/////Message at the top of the page showing the url////
$h_message1 = "Request sent by $realname";
$h_message2 = "Email adress $email";
$h_message3 = "Titlu site $sitetitle";
$h_message4 = "Adresa Site $sitelink";
$h_message5 = "Description: $sitedescription";
$h_message6 = "Category $category";
$h_message7 = "New Category $newcategory";
$h_message8 = "Reciprocal: $linktous";
/// Body message prepared with the message entered by the user ////
$body_message =$h_message1."\n" . $h_message2."\n". $h_message3."\n". $h_message4."\n". $h_message5."\n".
$h_message6."\n" . $h_message7."\n"." "."\n". $h_message8."\n";
//// Mail posting part starts here /////////
$headers="";
//$headers = "Content-Type: text/html; charset=iso-8859-1\n".$headers;
// Un comment the above line to send mail in html format

$headers4=$email; // Change this to change from address
$headers.="Reply-to: $headers4\n";
$headers .= "From: $headers4\n";
$headers .= "Errors-to: $headers4\n";
$subject="Link exchange pentru 4myown.biz";
mail($wmaster,$subject,$body_message,$headers);
////// Mail posting ends here ///////////
echo "<font face='Verdana' size='2' color='#11486B'><b>Thank You $nume,</b><br>Your message has been sent to our staf
<br><br> Please <a href=$ref><b>Click Here</b></a> to go back</font>";
//////////// Sending the message ends here /////////////


}else{// display the error message
echo "<center><font face='Verdana' size='2' color=red>$msg</font></center>";
}
?>

Last edited by interval; 02-10-2009 at 11:52 AM.
interval is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 07:34 PM.


Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Webmaster Forums
Web Hosting | Chicago Web Hosting | Web Hosting