Jump to content

andrew_U

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

andrew_U's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i would like to make a databse on my server to hold the emails for the people who chose to be contacted by me. i am currently using an emailing script to send me an email every time someone wants to join.but i would like it to send it to a databse. how do i do this?
  2. i dont know much about php. but i think the problem is that your trying to change the array $email - $_SESSION['email_address'] to $email - $_SESSION['logged_in'] correct? this means that any information put into 'email_address' is lost in the code and it messes up your $email array. you would need to go through all of your files and change any instance of 'email_address' to 'logged_in' other wise it would not work properly ex. i save a notepad file as example.TXT and then try to get information from it by entering example.MP3 it just doesn't work. you need a music player to open an .mp3 file. so for this case you need a so called 'email_address' "file" (not literally) to make the script work properly it just doesn't work. heres another example using a deffierent php script, with a two file set-up. this php script takes the information you submit to a form and emails it to any email you want. this is the first file contact.php notice the words: "firstname" "lastname" "email" "contact" and "say" <form action="send.php" method="POST"> <p><b>First Name</b><br/> <input type="text" name="firstname" size=40 /> <br/> <b>Last Name:</b><b> (optional)</b> <input type="text" name="lastname" size=40 /> <br /> <b>Email:</b><br/> <input type="text" name="email" size=40 /> <br /> <br/> <p><select name="contact"> <option selected="selected">Why/who are you contacting?</option> <option>I found a Problem</option> </select></p> </p> <p><b>Type your statement here:</b></p> <p> <label for="say"></label> <textarea name="say" id="say" cols="45" rows="5"></textarea> <br/> </p> <p> <input type="submit" value=" Send "> </p> </form>] ok now heres the second file named send.php see how how send.php relates to the "send.php" on line 1 of the first code? <?php $email = $_POST['email']; $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; $contact = $_POST['contact']; $say = $_POST['say']; $email1 = 'xxxxxxxx@hotmail.com'; $subject = "$contact"; $message = "First name: $firstname Last Name $lastname Email: $email $firstname $lastname is contacting us because of $contact this is what they want to say: $say "; if (mail($email1 , $subject,$message)) { echo "<h4>Thank you for sending email http://xxxxxxxxxxxxxx.com</h4>"; } else { echo "<h4>Can't send email to $email</h4>"; }?> notice how the "firstname" from the first code corresponds to the ['firstname'] from the second code? and the same with "lastname and "email" to change the value from 'email_address' to 'logged_in' means you need to go through your script and change all the values of "email_address" to "logged in" i hope this helped you in some way.
  3. sorry i forgot to include what i did to the file_get_contents script, i think i tried this: <php? $filename = ['xxxxxxx.mp3']; $flags = ['FILE_TEXT']; $context = ['NULL']; $offset = ['0'] $maxlen = ['999999999'] string file_get_contents ( string $filename [, int $flags [, resource $context [, int $offset [, int $maxlen ]]]] ) help cuz i don't really know what i am doing haha
  4. so i contacted a band with permission to play their song on my website. they said i can use it, but it cannot be downloaded. so i uploaded the .mp3 file i wanted to use and set the permissions so it could not be downloaded. but now the file will not play, because of the permissions change. i want to be able to use this simple script: <embed src="http://undignifiedconference.com/xxxxxxxx.mp3" autostart="true" loop="true"></embed> to play a music file "grabbed" by php is this possible? i am not that familiar with php and the code i tried to use was file_get_contents.
  5. never mind i fixxed it with this: $subject = 'TundraIRC Advertisements'; $message = "Someone wants to advertise on tundraIRC: $firstname $lastname Company: $company Website: $website Email: $email"; $email1 = 'email@email.com'; if (mail($email1 , $subject,$message)) { echo "<h4>Thank you for sending email</h4>"; } else { echo "<h4>Can't send email, try again later</h4>"; }?> thanks for the advice though ?
  6. i can't seem to find to problem with this php script. file1: advertise.html <html> <head> <title>TundraIRC Advertise</title> </head> <body> If you wish to Advertise on this website please fill out the following form and the Website Director will get back to you ASAP: <form action="advertise.php" method="POST"> <b>First Name</b><br/> <input type="text" name="firstname" size=40 /><br/> <b>Last Name:</b> <input type="text" name="lastname" size=40 /><br /> <b>Company</b><br/> <input type="text" name="company" size=40 /><br/> <b>Email</b><br/> <input type="text" name="email" size=40 /><br/> <b>Website Address</b><br/> <input type="text" name="website" size=40 /><br/> <input type="submit" value=" Send "> </form> file2: advertise.php <html> <head> </head> <body> <?php $email = $_POST['email']; $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; $company = $_POST['company']; $website = $_POST['website']; if (mail('email@email.com' , 'TundraIRC Advertisements','Someone wants to adveritse on tundraIRC: ' . $fistname . ' ' . $lastname . ' ' . $company . ' ' . $website . ' ' . $email)) { echo "<h4>Thank you for sending email</h4>"; } else { echo "<h4>Can't send email to $email</h4>"; } ?> </body> </html> when you click "submit" from the first file no information is recieved in the email. how do i fix this? **email@email.com is an example of the email used
×
×
  • 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.