Jump to content

env3rt

Members
  • Posts

    68
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

env3rt's Achievements

Member

Member (2/5)

0

Reputation

  1. Lol, I went into phpmyadmin and I can't even figure out how to create a damn table nvm found out how after 5 mins
  2. Fine, I'll go learn about them Although my host only allows one
  3. I've avoided using mySQL tables do you have to use them?
  4. I've tried googling it and can't find much maybe you could find something
  5. How do you check who is currently viewing your site like on this forum it says : 51 guests viewing and users etc... And how can you check when they leave? (Please no databases)
  6. Oh, so how could I get it to work without using the submit button?
  7. <form method="post" action="wherever u saved the .php file"> <input name="fromemail" type="text" /> <input name="toemail" type="text" /> <input name="subject" type="text" /> <textarea name="mainbox"></textarea> <input type="submit"> </form> You could replace the toemail input with a dropdown menu You could also set the fromemail to whatever you wanted using <input name="fromemail" type="hidden" value="example@example.com" /> This would say that you recieved an email from example@example.com
  8. In the form for the code you can type whatever email you want.
  9. <?php $subject = $_POST['subject']; $fromemail = $_POST['fromemail']; $toemail = $_POST['toemail']; $mainbox = $_POST['mainbox']; mail( "$toemail", "$subject", "$mainbox", "From: $fromemail" 'Reply-To: $fromemail' ); header( "Location: whatever site u want" ); ?> This is a much more simple code. (the form is not included but it is very easy to make)
  10. I could make them click the button but I want it to submit even if they don't click it, and the submit fuction with javascript doesnt work
  11. The problem is that when I have javascript automatically submit the form, the php doesn't work, but when I press the submit button it works perfectly. Does anyone know what I am doing wrong? Code is below. <?php echo " <head> <script> function yes(){ document.sform.submit() } </script> </head> <body onKeypress='yes()'> <form method='post' action='?' name='sform' id='sform'> <input type='text' id='this' name='this'> <input type='submit' id='subform' name='subform' value='subform'> </form> </body> "; if ($_POST['subform']){ $page = "expage.html"; $fh = fopen($page, 'w'); $example = $_POST['this']; fwrite($fh, $example); fclose($fh); echo "<script>alert('form submitted')</script>"; } ?> Please help if you can.
  12. I wanted javascript to call php not php to call javascript
×
×
  • 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.