Sythe.Org Forums     Register     FAQ     Members List     Calendar     Mark Forums Read    
 
Sythe.Org Forums  
   Runescape Gold

Sythe.org — A Virtual Goods Trading Hub

Make real cash! buying and selling in-game items.

We have a no-scam policy.

You can make thousands playing your favourite games here at Sythe.org.

Just sign up an account and follow the rules!


Take me to

Runescape Markets

Other Game Markets

Support Center

Register an Account

Close
Need help please. (PHP)
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 12-25-2009, 04:23 PM
Ex-Moderator
 
Join Date: Jun 2007
Location: North London.
Posts: 2,699
Default Need help please. (PHP)

okay here's my ************, and for some reason, when you don't input a field, in the HTML page it comes up with
Code:
$value){ if(in_array($value,$required)){ if ($key != 'subject' && $key != 'company') { if( empty($_POST[$value]) ) { echo 'PLEASE FILL IN REQUIRED FIELDS'; exit; } } $email_content .= $value.': '.$_POST[$value]."\n"; } } if(@mail($your_email,$email_subject,$email_content)) { echo 'Message sent!'; } else { echo 'ERROR!'; } } ?>
PHP Code:
<?php

if(!$_POST) exit;

$email $_POST['email'];


//$error[] = preg_match('/\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i', $_POST['email']) ? '' : 'INVALID EMAIL ADDRESS';
if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email )){
    
$error.="Invalid email address entered";
    
$errors=1;
}
if(
$errors==1) echo $error;
else{
    
$values = array ('name','email','message');
    
$required = array('name','email','message');
     
    
$your_email "[email protected]";
    
$email_subject "New Message: ".$_POST['subject'];
    
$email_content "new message:\n";
    
    foreach(
$values as $key => $value){
      if(
in_array($value,$required)){
        if (
$key != 'subject' && $key != 'company') {
          if( empty(
$_POST[$value]) ) { echo 'PLEASE FILL IN REQUIRED FIELDS'; exit; }
        }
        
$email_content .= $value.': '.$_POST[$value]."\n";
      }
    }
     
    if(@
mail($your_email,$email_subject,$email_content)) {
        echo 
'Message sent!'
    } else {
        echo 
'ERROR!';
    }
}
?>
__________________
Reply With Quote
  #2  
Old 01-01-2010, 04:37 PM
Rdogg999's Avatar
Active Member
 
Join Date: Jan 2008
Location: 127.0.0.1
Posts: 215
Default Re: Need help please. (PHP)

not sure, but try this:
PHP Code:
<?php

if(!$_POST) exit;

$email $_POST['email'];


//$error[] = preg_match('/\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i', $_POST['email']) ? '' : 'INVALID EMAIL ADDRESS';
if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email )){
    
$error.="Invalid email address entered";
    
$errors=1;
}
if(
$errors==1) echo $error;
else{
    
$values = array ('name','email','message');
    
$required = array('name','email','message');
     
    
$your_email "[email protected]";
    
$email_subject "New Message: ".$_POST['subject'];
    
$email_content "new message:\n";
    }
    foreach(
$values as $key => $value){
      if(
in_array($value,$required)){
        if (
$key != 'subject' && $key != 'company') {
          if( empty(
$_POST[$value]) ) { echo 'PLEASE FILL IN REQUIRED FIELDS'; exit; }
        }
        
$email_content .= $value.': '.$_POST[$value]."\n";
      }
    }
     
    if(@
mail($your_email,$email_subject,$email_content)) {
        echo 
'Message sent!'
    } else {
        echo 
'ERROR!';
    }
}
?>
__________________



Vouches :1
Good Trades:0
Bad Trades : 0
Reply With Quote
Reply



Cheap RS Gold Store  Runescape Gold

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

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

All times are GMT +1. The time now is 02:46 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.1