roScripts forum

Wordpress Script Generator
Easily write your own wordpress plugins!
www.wpsecrets.com

Learn Simple PHP
Learn PHP with these simple videos!
www.simplephp.com

PLR Poster
Post hundreds of articles to your wordpress blog(s) at a time!
www.softwarefactoryinc.com/blog-software


Go Back   roScripts forum > General > roScripts related discussions

roScripts related discussions If there's anything that you hate, love or wish seing please say it here.

Reply
 
Thread Tools Display Modes
Old 07-08-2008, 02:29 AM   #1 (permalink)
vinix
Junior Member
 
Join Date: Jul 2008
Posts: 1
Rep Power: 0 vinix is on a distinguished road
Default Adding more input error

Hello everyone,
First of all, i would like thank you for your great ajax_email script it work prefect.
Sorry my english is not very good
I am very new in scripting,i trying to add more input but i getting error.
For example this form:-
Code:
Family Name

Given Name

Date Of Birth

Address

Phone

Email

Qualification

Course Chosen

Name Of University

Course Duration

Mauritius Address If Any

Contact Person In Mauritius
This is html code i have download from your site:
Code:
<body>
    <div id="log">
    <div id="log_res">
        <!-- spanner -->
    </div>
    </div>
    <form id="myForm" action="send.php" method="get" name="myForm">
    <div id="form_box">
        <div>
            <p>
                First Name:
            </p><input type="text" name="first_name" value="" />
        </div>
        <div>
            <p>
                Last Name:
            </p><input type="text" name="last_name" value="" />
        </div>
        <div>
            <p>
                E-Mail:
            </p><input type="text" name="e_mail" value="" />
        </div>
        <div>
            <p>
                Message:
            </p><textarea name="message" cols="40" rows="5"></textarea>
        </div>
        <div class="hr">
            <!-- spanner -->
        </div><input type="submit" name="button" id="submitter" /></div>
    </form>
</body>
This sendphp :
Code:
<?php
    error_reporting(E_NOTICE);

    function valid_email($str)
    {
        return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $str)) ? FALSE : TRUE;
    }

    if($_POST['first_name']!='' && $_POST['last_name']!='' && $_POST['e_mail']!='' && valid_email($_POST['e_mail'])==TRUE && strlen($_POST['message'])>30)
    {
        $to = 'youremail@yourdomian.com';
        $headers =     'From: '.$_POST['e_mail'].''. "\r\n" .
                'Reply-To: '.$_POST['e_mail'].'' . "\r\n" .
                'X-Mailer: PHP/' . phpversion();
        $subject = "Hello! I'm testing my new ajax email that I got from roscripts.com";
        $message = htmlspecialchars($_POST['message']);
        
        if(mail($to, $subject, $message, $headers))
        {//we show the good guy only in one case and the bad one for the rest.
            echo 'Thank you '.$_POST['first_name'].'. Your message was sent';
        }
        else {
            echo "Message not sent. Please make sure you're not
                running this on localhost and also that you 
                are allowed to run mail() function from your webserver";
        }
    }
    else {
        echo 'Please make sure you filled all the required fields, 
        that you entered a valid email and also that your message 
        contains more then 30 characters.';
    }
?>
My question how can i validate this form that will show all filled in my email.
Help will be much appreciate.
Thank
Vinix
vinix is offline   Reply With Quote
Sponsored Ads   #1.5
Sponsored posting
 
 
Join Date: The beginning
Posts: lots
Sponsored by...

WM Media - Sell Your Website at above market prices!
Adbot is online  
Old 08-02-2008, 06:32 PM   #2 (permalink)
loqpol
Super Moderator
 
Join Date: Nov 2007
Posts: 133
Rep Power: 2 loqpol is on a distinguished road
Default Re: Adding more input error

welcome, post error to help us
loqpol is offline   Reply With Quote
Old 08-12-2008, 05:21 AM   #3 (permalink)
greenlasersguru
Junior Member
 
Join Date: Aug 2008
Posts: 1
Rep Power: 0 greenlasersguru is on a distinguished road
Lightbulb Funny

Awesome post,Thanks for sharing.
greenlasersguru is offline   Reply With Quote
Old 09-08-2008, 04:31 AM   #4 (permalink)
micky0604
Junior Member
 
Join Date: Sep 2008
Posts: 1
Rep Power: 0 micky0604 is on a distinguished road
Default Re: Adding more input error

Good~
Very good~
__________________
To wow power leveling,are you?
micky0604 is offline   Reply With Quote
Old 09-10-2008, 06:44 PM   #5 (permalink)
Blamo_
Junior Member
 
Join Date: Aug 2008
Posts: 14
Rep Power: 0 Blamo_ is on a distinguished road
Default Re: Adding more input error

Quote:
Originally Posted by vinix View Post
Hello everyone,
First of all, i would like thank you for your great ajax_email script it work prefect.
Sorry my english is not very good
I am very new in scripting,i trying to add more input but i getting error.
For example this form:-
Code:
Family Name

Given Name

Date Of Birth

Address

Phone

Email

Qualification

Course Chosen

Name Of University

Course Duration

Mauritius Address If Any

Contact Person In Mauritius
This is html code i have download from your site:
Code:
<body>
    <div id="log">
    <div id="log_res">
        <!-- spanner -->
    </div>
    </div>
    <form id="myForm" action="send.php" method="get" name="myForm">
    <div id="form_box">
        <div>
            <p>
                First Name:
            </p><input type="text" name="first_name" value="" />
        </div>
        <div>
            <p>
                Last Name:
            </p><input type="text" name="last_name" value="" />
        </div>
        <div>
            <p>
                E-Mail:
            </p><input type="text" name="e_mail" value="" />
        </div>
        <div>
            <p>
                Message:
            </p><textarea name="message" cols="40" rows="5"></textarea>
        </div>
        <div class="hr">
            <!-- spanner -->
        </div><input type="submit" name="button" id="submitter" /></div>
    </form>
</body>
This sendphp :
Code:
<?php
    error_reporting(E_NOTICE);

    function valid_email($str)
    {
        return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $str)) ? FALSE : TRUE;
    }

    if($_POST['first_name']!='' && $_POST['last_name']!='' && $_POST['e_mail']!='' && valid_email($_POST['e_mail'])==TRUE && strlen($_POST['message'])>30)
    {
        $to = 'youremail@yourdomian.com';
        $headers =     'From: '.$_POST['e_mail'].''. "\r\n" .
                'Reply-To: '.$_POST['e_mail'].'' . "\r\n" .
                'X-Mailer: PHP/' . phpversion();
        $subject = "Hello! I'm testing my new ajax email that I got from roscripts.com";
        $message = htmlspecialchars($_POST['message']);
        
        if(mail($to, $subject, $message, $headers))
        {//we show the good guy only in one case and the bad one for the rest.
            echo 'Thank you '.$_POST['first_name'].'. Your message was sent';
        }
        else {
            echo "Message not sent. Please make sure you're not
                running this on localhost and also that you 
                are allowed to run mail() function from your webserver";
        }
    }
    else {
        echo 'Please make sure you filled all the required fields, 
        that you entered a valid email and also that your message 
        contains more then 30 characters.';
    }
?>
My question how can i validate this form that will show all filled in my email.
Help will be much appreciate.
Thank
Vinix
could use the
PHP
mail();
Parsed in 0.003 seconds
function to send it to mail as soon as the form is submitted
Blamo_ is offline   Reply With Quote
Old 09-30-2008, 08:02 PM   #6 (permalink)
Lihualee
Junior Member
 
Join Date: Sep 2008
Posts: 11
Rep Power: 0 Lihualee is on a distinguished road
Post yes!

bump up then lurk -------------------------------------------------------------wow power leveling..wow power leveling..Cheap WoW Gold..WoW Gold..World Of Warcraft gold,
__________________
WoW Power Leveling
Lihualee is offline   Reply With Quote
Old 10-30-2008, 02:55 AM   #7 (permalink)
wowgolds989
Member
 
Join Date: Oct 2008
Posts: 54
Rep Power: 1 wowgolds989 is on a distinguished road
Default October 30, 2008

Octobe 30, 2008 - MMOinn research centre has just developed the world's buy wow gold which can significantly increase the future output of wow gold . "It is real, the new hybrid gold will give us around 40 billion more gold every week," said an expert. The hybrid gold rice may end up replacing all the Wow power leveling in a few months. A new revolution will sweep over the gold farming industry and bring us the ultimate abundance of Cheap wow gold .
__________________
get cheap wow gold here right now!!!
wowgolds989 is offline   Reply With Quote
Old 11-11-2008, 05:29 PM   #8 (permalink)
LAPIII
Junior Member
 
Join Date: Nov 2008
Posts: 1
Rep Power: 0 LAPIII is on a distinguished road
Default Re: Adding more input error

Where can I find the Ajax e-mail script mentioned in this thread?
LAPIII is offline   Reply With Quote
Old 11-25-2008, 09:53 AM   #9 (permalink)
vwxy473
Member
 
Join Date: Sep 2008
Posts: 63
Rep Power: 1 vwxy473 is on a distinguished road
Default to play wow gold

We offer retailwow goldand wholesale pricing for buyingwow goldWoW gold and DAOC goldwow gold. Whether you are supplying your guild or buyingwow goldWOW gold for your twinkwow gold, FavGames is theright place for you.
vwxy473 is offline   Reply With Quote
Reply


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
Forum Jump



All times are GMT. The time now is 01:25 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.