Jump to content

shortj75

Members
  • Posts

    118
  • Joined

  • Last visited

    Never

About shortj75

  • Birthday 10/22/1975

Contact Methods

  • AIM
    shortj76
  • MSN
    theshort175@hotmail.com
  • Yahoo
    shortj75

Profile Information

  • Gender
    Not Telling
  • Location
    Port Huron,mi

shortj75's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. did you try changeing this echo "<td>$td</td>\r\n"; to echo "<tr><td>$td</td></tr>\r\n"; this should be close to what your looking for
  2. if you post the script might help so ppl can see what they are working with and see if the prob might be in the script and if we can see it we could figure it out quicker sry if sounds rude not trying to be
  3. this is a simple html email i use and it work for me and it works great and really simple here is the mail form mail.php <form method="post" action="mail2.php"> <table width=100% height=100% cellspacing=0 cellpadding=5 bgcolor=lightblue valign=top><td> To: <input type=text name=to size=30 style="border-width:0px;"> <br> From: <input type=text name=from style="border-width:0px;"> <br> Subject: <input type=text name=sub size=60 style="border-width:0px;"><br> <br> Messege:<br> <textarea name=mess cols=100 rows=20 style="border-width:0px;"></textarea><br> <br> <input type=submit value=send> </td></tr></table></form> and her is the php code to send it $to=$_POST['to']; $mess=$_POST['mess']; $my_subject=$_POST['sub']; $messege="$_POST['mess']"; $my_headers ="MIME-Version: 1.0\r\n"; $my_headers.="Content-type: text/html; charset=iso-8859-1\r\n"; $my_headers.="From: $_POST[from]"; $mail=mail("$to", "$my_subject", "$messege", "$my_headers"); if(!$mail){ print "<center>Sorry Your E-mail Was Not Sent</center>"; }else{ print "<center>Your E-mail Was Sent Successfuly</center>"; } hopefully this helps and if it doesnt i am sorry
  4. try this $filename="$_POST[title]"; if (!$handle = fopen($filename, 'a')) { echo "Cannot open file ($filename)"; exit; } if (fwrite($handle, $body) === FALSE) { echo "Cannot write to file ($filename)"; exit; } that is what i use well close to it i change it a little the file name is the full path on my server like C:/drive/location i hope this helps fclose($handle);
  5. change table width from <table width='100%' align='center' cellpadding='0' cellspacing='0'> to "<table width='75%' align='center' cellpadding='0' cellspacing='0'> or you could try changing this <td> to <td width=100> or any number you desire and see if that helps
  6. i agree with pocobueno1388 if you know the scripts do the site but if you dont feel comfortable learn more i have been doing php for about 5 years and i learn new stuff all the time
  7. you could try session_start(); if (isset($_SESSION['user'])) { page code here } else { echo "SORRY YOU ARE AUTHORIZED TO VEIW THIS SITE!!!"; } this is the code i use and it works good
  8. i had the same problem i fixed it by adding a break <br> after my query like this $getnum=mysql_query("SELECT * from yourtable"); while($getnum2=mysql_fetch_array($getnum)){ echo "$getmun2[tablerow]<br>"; }
  9. can you post some code to see if someone here canfigure out if that is the problem
  10. did you try to use stripslashes like so [code] $body = $_POST['body']; $body = stripslashes($body); [/code] that should remove the ////// but i did notice that you are useing addslashes($body) that will add the ///////  so change addslashes to stripslashes and that should solve your problem
  11. your host probably means to do it by haveing you maile go through a different mail host like yahoo or something like so [code] <?php $from = "who from <from@therehost.com>"; $to = "you<you@yourhost.com>"; $subject = "whats up"; $body = "nothing and you"; $host = "smtp.host.com"; //(like smtp.yahoo.com)or msn or who ever you user for your email address $username = "your_username";(example: killer) $password = "your_password";(example: dog or ****) $headers = array ('From' => $from,   'To' => $to,   'Subject' => $subject); $smtp = Mail::factory('smtp',   array ('host' => $host,     'auth' => true,     'username' => $username,     'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) {   echo("<p>" . $mail->getMessage() . "</p>"); } else {   echo("<p>Message successfully sent!</p>"); } [/code] or something along that line this code might or might not work for you but some one else may have one that will work better for what you need
  12. if the script i posted workes you may want to try to declair your varibles like so [code] $to = "myid@mydomain.com"; $sub = "Testing..1..2..3..4"; $mess = "Just testing..."; $from ="From: $_POST[email]"; [/code] instead of [code] $mail=new My_Smtp_Mail(); $mail->smtp_host=''; //i tried with localhost and also with the smtp server name my hostingsite provided to me.. but nothing worked $mail->to="myid@mydomain.com"; $mail->from="anotherid@gmail.com"; $mail->cc=''; $mail->bcc=''; $mail->subject="Testing..1..2..3..4"; $mail->body="Just testing..."; $mail->rigorous_email_check=1; [/code] because your host has register globals off witch is recomended and if that is the case you may have to declair them like so $to = $_POST['to']; or else they wont work
  13. first try this script it is the form and mail script in one this script is set to work with the name simpleemail.php so you will want to name this page that ok [code] //this is so you dont get any notices or warnings <? error_reporting(E_ERROR);?> <? //this is the mail script $to = $_POST['to']; $sub=$_POST['sub']; $mess = $_POST['mess']; $from="From: $_POST[email]"; if(isset($_POST['submit'])){        $mail=mail("$to", "$sub", "$mess", "$from");     if(!$mail){ print "<center>Sorry Your E-mail Was Not Sent</center>"; }else{ print "<center>Your E-mail Was Sent Successfuly</center>"; } }else{ //and here is the mail form print "<form method=post action=simpleemail.php>"; print "<center><table cellpadding=0 cellspacing=0 class=contacttable><tH class=contacthead><center>Simple E-mail</CENTER>"; print "<TR><TD>To: <input type=text name=to size=40>"; print "<TR><TD>From: <input type=text name=email>"; print "<TR><TD>Subject: <input type=text name=sub size=70>"; print "<TR><TD>Message:<br />"; print "<textarea name=mess cols=80 rows=10></textarea><BR />"; print "<input type=submit name=submit value=send>"; print "</th></tr></td></table></center></form>"; } ?> [/code] if this script doesnt work your host either doesnt have a mail server or hasnt enabled it to let there users run scripts from there pages and i know for a fact this script works because i use to use it on my page
×
×
  • 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.