Jump to content

makeITfunctional

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

makeITfunctional's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks, pernest for responding. As for the optional headers of: $to = 'nobody@example.com'; $subject = 'the subject'; $message = 'hello'; $headers = 'From: webmaster@example.com' . "\r\n" . 'Reply-To: webmaster@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); How do I make them dynamic based on the code from my original post?
  2. Hi, PHP Freaks, I have two questions for you: Based on the code below, I am trying to get the form, when it is emailed to me, to be from the email address in field_5. I know it has something to do with headers, but what would that code look like? Second, if there is a captcha error, the PHP code takes you to a blank page to display the message "Invalid Captcha Please press the back button on your browser and try again". Is there a way to have that code appear in a dialog box on the same page as the form? If so, what would that code look like? Thanks so much! Here is the code below: <?php session_start(); if( ($_SESSION['security_code']==$_POST['security_code']) && (!empty($_POST['security_code'])) ) { // File upload handling if($_FILES['field_9']['name']!=''){ $field_9_filename = "file_9_".date("sihdmY").substr($_FILES['field_9']['name'],strlen($_FILES['field_9']['name'])-4); if(!move_uploaded_file($_FILES['field_9']['tmp_name'], "./upload/".$field_9_filename)){ die("File " . $_FILES['field_9']['name'] . " was not uploaded."); } } mail("example@example.com","Form submission email","Form data First Name: " . $_POST['field_1'] . " Last Name: " . $_POST['field_2'] . " Organization: " . $_POST['field_3'] . " Website: " . $_POST['field_4'] . " Email: " . $_POST['field_5'] . " Phone: " . $_POST['field_7'] . " Description: " . $_POST['field_8'] . " File: ".$where_form_is."upload/".$field_9_filename." (original file name: " . $_FILES['field_9']['name'] . ") "); include("form_completed.html"); } else { echo "Invalid Captcha Please press the back button on your browser and try again"; } ?>
  3. Hey, savagenoob. Thanks for your help -- you gave me some direction! Yeah, I guess the website code I pasted wasn't necessary. What's the best way to carry over mySQL data using $_SESSION? I appreciate it!
  4. Hi, PHP Freaks! I have a question for you regarding the ability for PHP to carry information over to another page. To explain: This is for a wedding registry website I am constructing. On page one, I have a search field. If you search for Joe Smith, you will then be taken to a dynamically generated PHP & HTML page that displays any Joe Smiths in the database. From there, you could click on the name of the wedding party you wanted and a page would load that would have a photo of the bride and groom couple. Finally, from the photo page, you could click a button again that would load a wedding registry for the couple. I have not pasted the search page, but I am pasting the code for the PHP page that generates the listings of the couples. How can I have it bridge (and remember) the information so that I can add a photo page that then carries the data to the registry page? I have pasted the code here: http://pastie.org/private/iw0obthro1l716uqtppqfa But as the code is, it only will take you to the listing of the people -- I basically need the PHP code to be carried through to subsequent pages, how can I do this? I know this is hard to follow so please ask if you have any questions! Thanks!
  5. Hi, PHPFreaks! I have a question for you. I have a PHP & MySQL site that I am trying to build and I am looking for a piece of PHP code that can help facilitate a search. Let me explain: I have a search page for a wedding registry. If you enter in the correct first name and the correct last name (matched against what is in the MySQL database) then it will take you to the exact webpage. If the search is NOT exact or has multiple results, then it will take you to a page that displays the results and you select which name you meant. To clarify: 1. You go to the search page and type in: Neil Armstrong 2. If there is only one Neil Armstrong in the database, you will be redirected to neilarmstrong1.php or neilarmstrong1.html 3. However, if there are 3 results for Neil Armstrong, you will be presented with the results page (let's call it a landing page) and from there you will choose which one you want: neilarmstrong1, 2, or 3. So, my question is, if there is an exact match from the search, how do you skip the "landing page" and go right to the php or HTML file? Sorry it is complicated, please let me know if I can help clarify. Thanks for your help and time! My regards.
×
×
  • 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.