Jump to content

HNX

Members
  • Posts

    102
  • Joined

  • Last visited

    Never

Posts posted by HNX

  1. huh will that do the work???

    btw my question was as follows

    ok first let me undertand how to make the page "success.php" so what i need to do is copy my contact page and remove the form and write instead " your msg was sent" right?

     

    i asked i have to make the file but then ur tellin me to replace somethin?!!

     

    im puzzled!!:|

  2. <?php
    if(isset($_POST['Submit'])){
    	$to = "YOUR HOTMAIL ADDRESS";
    	$subject = $_POST['subject'];
    	$message = $_POST['detail'];
    	$from = $_POST['name'];
    	$headers = "From: $from";
    	if(mail($to,$subject,$message,$headers)) {
    		//echo "Thank you for your interest, your e-mail was sent.";
                            header("Location: success.php"); // change "sucess.php" to the page you want them to be redirected to; if email is submitted successfully.
                            exit;
    	}
    
    }
    
    	print '<form action="" method=post name=form1 id=form1>';
    	print '<table width="100%" border="0" cellspacing="1" cellpadding="3">';
    	print '<tr>';
    	print '<td width="16%"><span class="style108">Subject</span></td>';
    	print '<td width="2%"><span class="style104">:</span></td>';
    	print '<td width="82%"><input name="subject" type="text" id="subject" size="50" /></td>';
    	print '</tr>';
    	print '<tr>';
    	print '<td><span class="style108">Message</span></td>';
    	print '<td><span class="style104">:</span></td>';
    	print '<td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td>';
    	print '</tr>';
    	print '<tr>';
    	print '<td><span class="style108">Name</span></td>';
    	print '<td><span class="style104">:</span></td>';
    	print '<td><input name="name" type="text" id="name" size="50" /></td>';
    	print '</tr>';
    	print '<tr>';
    	print '<td><span class="style108">Email</span></td>';
    	print '<td><span class="style104">:</span></td>';
    	print '<td><input name="customer_mail" type="text" id="customer_mail" size="50" /></td>';
    	print '</tr>';
    	print '<tr>';
    	print '<td> </td>';
    	print '<td> </td>';
    	print '<td><input type="submit" name="Submit" value="Submit" />';
    	print '<input type="reset" name="Submit2" value="Reset" /></td>';
    	print '</tr>';
    	print '</table>';
    	print '</form>';
    
    ?>
    

     

    does it have to be a php file??  and when u say "change "sucess.php" to the page you want them to be redirected to; if email is submitted successfully." thats what i should write?? so does it mean i can remove this from the code afterwards???

  3. WOW!! joey we're almost there :P ok now when i submit using the new file everything works fine and this time the script brings me back to a blank page but this time instead i can see the form again....

     

    all there is left to do is the repair the destination of the script, i mean not bringing me to a blank page :D

     

    look at the site i found, i saw their contact page and thats the kind i need:s

    http://www.elico.ca/main.cfm?p=40&l=fr

     

    thanks man,

    HNX

  4. yes i do ok wait sensei gave me a simple script and it was working fine but the only problemi had was that when i submited the information it went to a blank page tellin me that ur msg was received. instead i want it to load on the same page and then i tried replacing the files and everything he gave and told him what it tells,

     

    and now i gave him my contact us form and my send_mail.php file so i thought he would understand more this way

     

    and yes php is enabled

     

    thanks,

    HNX

  5. euh wait i took the previous code that u gave me and saved it as send_mail.php and replaced it with the other. the other one when i clicked submit it brang me to a blank page sayin the msg was received and the recent code that u gave does the EXACT same thing however the code is longer

    so thats why i gave u the my send mail file AND my contact us file so that u can understand what i need and make the code :D

     

    but anyway here is the link again

     

    http://www.megaupload.com/?d=62MOL06W

     

    Regards,

    HNX

     

    and dude cant u give me ur email?? yes or no? Loll

  6. look what someone tells me to do on another forum

     

    Submits the info to itself...
    PHP Code:
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
    Check if form has been submitted:
    PHP Code:
    <?php if(isset($_POST['form'])){
    process stuff here...
    echo "Thank you for your feedback!";
    }else{
      display form
    }
    ?> 

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.