jibo Posted December 8, 2006 Share Posted December 8, 2006 im the big problem lol, ive looked at the tutorial on php but it says "This tutorial will not explain how to install PHP, MySQL, or Apache Server" but thats really what i need, i think :S im sure the host im using supports php but i dont know how to use php, for example, if i want an email script id use the code below, rite? obviously id have to change the email address but is there anything else id need to change aswel? i know your all going to say learn php scripting before you try to use it on your site... but i think if i do it my way ill learn from my mistakes, if you know what i mean <html><body><?phpif (isset($_REQUEST['email']))//if "email" is filled out, send email { //send email $email = $_REQUEST['email']; $subject = $_REQUEST['subject']; $message = $_REQUEST['message']; mail( "someone@example.com", "Subject: $subject", $message, "From: $email" ); echo "Thank you for using our mail form"; }else//if "email" is not filled out, display the form { echo "<form method='post' action='mailform.php'> Email: <input name='email' type='text' /><br /> Subject: <input name='subject' type='text' /><br /> Message:<br /> <textarea name='message' rows='15' cols='40'> </textarea><br /> <input type='submit' /> </form>"; }?></body></html> soooo... how would i get this email page (or whatever you want to call it) on my site or any other kind of php script? ive got a MySQL database, dunno if thats what i need or not please help or give me best tips you can. thanks, the silly newb Link to comment Share on other sites More sharing options...
jibo Posted December 9, 2006 Author Share Posted December 9, 2006 HAHA my newbiness is quite embarrasing reli, i tried a couple of things to see if i could work it out. like putting the code into my html file but nothing worked... then i just change the file type ie homepage.html to homepage.php and it worked, jus so i can carry on doing this... i am right arent i? thanks Link to comment Share on other sites More sharing options...
justsomeguy Posted December 11, 2006 Share Posted December 11, 2006 The server has to be set up to send file types to the PHP engine. It will usually send .php and .php3 files to PHP, and it can be setup to also send .html or anything else. But yes, you need to save the file with an extension that will get sent to the PHP engine. Link to comment Share on other sites More sharing options...
jibo Posted December 13, 2006 Author Share Posted December 13, 2006 okies thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now