Jump to content

OOP

Members
  • Posts

    146
  • Joined

  • Last visited

About OOP

  • Birthday 09/06/1978

Contact Methods

  • MSN
    ashoms0a@hotmail.com

Profile Information

  • Gender
    Male
  • Location
    Saudi Arabia

OOP's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi edgarasm, Is your HTML code complete? I am a bit confused as I can see three open form tags each pointing to different php script. One more thing, it is not secure to use user provided inputs directly in your SQL statement.
  2. Hi there, The action attribute specifies where to send the form-data when a form is submitted so you need to replace the '#' with your target file. Now, I don't know what you are doing in your PHP file but the global array $_POST will have the value of all of your form inputs fields which can be used in order to process your contact form. For example, in order to get the value of the input field "fullname" you can do something like this $fullName = $_POST['fullname]; Not to forget to say that you must not trust any inputs and must clean all before using in your script Hope this is easy to understand
  3. Barand, because he is using the $_POST super global array in his script and not the $_GET
  4. You need to execute the query against your database using the mysql_query($query). You are not doing anything in your code and that is why your information is not getting inserted in the database. One more thing, the form method should be "post" instead of "get"
  5. I tried to open the page but it does not work for me!!!
  6. lluvatar+ What is your database character set? I am pretty sure it has something to do with that and the encoding you are using when displaying the page. Regards
  7. I believe this has something to do with character set used in your database, if I am not mistaken
  8. You may also want to validate both email and password fields, I mean the format, as extra security measures.
  9. That is my problem, Christian . Being too kind
  10. Hi kdigital, It would be helpful if you can post your code, or at least the portion you are talking about, so that we can provide the required help.
  11. I tried you code on my PC and it works fine except that it shows the thanks message twice. Once before the form, and the other after the form upon successful form submission. I have modified the code a bit, you may try it. <html> <head> </head> <body> <?php if (isset($_POST['submit'])) { if ( empty($_POST['email']) || !preg_match("/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/",$_POST['email'])) { $msg = 'please provide a valid email'; } else { $email = $_POST['email']; $recipient = "myemail@myemail.com"; $subject = "Contact Form Email Subject"; $message = "your email message"; $mailheader = "From: $email \n"; mail($recipient, $subject, $message, $mailheader) or die("Error!"); $msg = "<font color='green' size='3'>Thank You for your message.</font>"; } } ?> <form method="POST"> <p align="center"> Enter your valid email id: <br> <input type="text" name="email"> <br> <input type="submit" name="submit" value="Subscribe now!"> </form> <?php echo $msg; ?> </body> </html>
  12. Hi there, I beleive the "language" attribute in script tag is obsolete in HTML5, remove it and that should solve your issue.
  13. Okay, I just spent few minutes trying to rewrite your code. Please find the attached modified scripts. Should you need any further clarification, please let me know Best regards BooksLoader.zip
  14. You are most welcome my friend, any time
×
×
  • 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.