Jump to content

mme

Members
  • Posts

    65
  • Joined

  • Last visited

    Never

Everything posted by mme

  1. mme

    HTTP ROOT

    Awesome Thanks so much
  2. mme

    HTTP ROOT

    Thanks But what if I wanted to use this on another server that doesnt use httpdocs? without manual changes for each different server?
  3. mme

    HTTP ROOT

    I want to use it in a script without the last directory and its slash. In my case without /httpdocs/
  4. mme

    HTTP ROOT

    Hi I would like it so a varible is assigned to the http root <?php $myvar = getenv("DOCUMENT_ROOT"); ?> However I want the last directory to be removed eg; from /var/www/vhosts/mysite.com/httpdocs to /var/www/vhosts/mysite.com Thanks
  5. Hi I am trying to send an html email using php Why doesnt this display it correctly? <?php // get posted data into local variables $EmailFrom = Trim(stripslashes($_POST['EmailFrom'])); $EmailTo = "*****@**********.com"; $Subject = "*********** - Contact"; $Name = Trim(stripslashes($_POST['Name'])); $Age = Trim(stripslashes($_POST['age'])); $Gender = Trim(stripslashes($_POST['gender'])); $Exp = Trim(stripslashes($_POST['experience'])); $Examples = Trim(stripslashes($_POST['examples'])); $Contact = Trim(stripslashes($_POST['contact'])); $Time = Trim(stripslashes($_POST['time'])); $Job = Trim(stripslashes($_POST['job'])); $Length = Trim(stripslashes($_POST['length'])); $Pay = Trim(stripslashes($_POST['pay'])); $Kind = Trim(stripslashes($_POST['kind'])); $Online = Trim(stripslashes($_POST['online'])); $HowLong = Trim(stripslashes($_POST['howlong'])); $EmailCheck = Trim(stripslashes($_POST['emailcheck'])); $PM = Trim(stripslashes($_POST['pmcheck'])); $Ded = Trim(stripslashes($_POST['dedication'])); $EmailCheck = Trim(stripslashes($_POST['emailcheck'])); $Skill = Trim(stripslashes($_POST['skill'])); $Agree = Trim(stripslashes($_POST['agree'])); // prepare email body text $Body = "<html>"; $Body .= "<body>"; $Body .= "<div align='center'>"; $Body .= "<table border=\'0\' cellpadding=\'2\' cellspacing=\'2\' class=\'emailbody\'>"; $Body .= " <tr class=\'emailbody\'>"; $Body .= " <td class=\'emailbody\'><table width=\'600\' border=\'0\' cellpadding=\'0\' cellspacing=\'0\'><tr> "; $Body .= " <td><img src='someimage.jpg' width='518' height='73'></td>"; $Body .= " </tr>"; $Body .= " </table></td>"; $Body .= " </tr>"; $Body .= " <tr> "; $Body .= " <td>"; $Body .= " <h2>Member Request Form</h2>"; $Body .= " <p> </p>"; $Body .= " <tr> "; $Body .= " <td class=\'main\'><p><em>Personal Information</em></p>"; $Body .= " <p>Name: " . $Name . "<br>"; $Body .= " Age: " . $Age . "<br>"; $Body .= " Gender: " . $Gender . "<br>"; $Body .= " Email: " . $mail . "<br>"; $Body .= " Time Zone: " . $time . "<br>"; $Body .= " <br>"; $Body .= " </p> </td>"; $Body .= " </tr>"; $Body .= " <tr height=\'14\' class=\'main\'> "; $Body .= " <td height=\'14\'><p><em>Experience</em> </p>"; $Body .= " <p>Experience: " . $experience . "<br>"; $Body .= " Examples: " . $Examples . "<br>"; $Body .= " Position Applieing For: " . $job . "<br>"; $Body .= " Length Of Contract: " . $length . "<br>"; $Body .= " <br>"; $Body .= " </p></td>"; $Body .= " </tr>"; $Body .= " <tr class=\'main\'> "; $Body .= " <td class=\'main\'><p><em>Payment</em></p>"; $Body .= " <p>Are You expecpting Pay: " . $pay . "<br>"; $Body .= " If So How much: " . $amount . "<br>"; $Body .= " <br>"; $Body .= " </p></td>"; $Body .= " </tr>"; $Body .= " <tr>"; $Body .= " <td height=\'14\' class=\"main\"><p><em>Time Online</em></p>"; $Body .= " <p>How Many Times Are you online per day: " . $online . "<br>"; $Body .= " How Long: " . $howlong . "<br>"; $Body .= " How often do you check your email: " . $emailcheck . "<br>"; $Body .= " How Often do you check your PM: " . $pmcheck . "<br>"; $Body .= " How much time are you willing to dedicate to your team: " . $dedication . "<br>"; $Body .= " Skill Rate (?/10): " . $skill . "<br>"; $Body .= " <br>"; $Body .= " </p></td>"; $Body .= " </tr>"; $Body .= " <tr height=\'14\'> "; $Body .= " <td height=\'14\'><p><em>Agreement</em></p>"; $Body .= " <p>Agree to the terms: " . $agree . "</p>"; $Body .= " <p> </p></td>"; $Body .= " </tr>"; $Body .= " <tr height=\"'4\'> "; $Body .= " <td height=\'14\'><div align='center' class='style1'>© 2008 ************ - EMail Generated By ***** (MS1)</div></td>"; $Body .= " </tr>"; $Body .= " </table>"; $Body .= " </table>"; $Body .= "</div>"; $Body .= "</body>"; $Body .= "</html>"; // send email $success = mail($EmailTo, $Subject, $Body, "From: <$Email>"); // redirect to success page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=ok.html\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=error.html\">"; } ?>
  6. Ok thanks however now when i went to put my html code around the php codes so it displays in a certain part of the page it gave me the error
  7. Sorry I just thought of something. what if the variable status is something that is not in the switch statment command how can I make it display a something instead of a blank page? eg; status = "hhfiudh" currently it displays a blank page how would I make it display something?
  8. Thanks the code seems to be working however when the variables are all set to false it just shows a blank page instead of the specified html page.
  9. Whats wrong with this code I get the error: <?php include("settings.php"); if $disable = "true" {printf("The Website you are trying to reach is currently unavailible"); exit;} if $update = "true" {printf("The Website you are trying to reach is currently being updated"); exit;} if $disbale = "false" { if $update = "false" { header( 'Location: pass.html' ) ;}} ?>
  10. Do you have a simple example because I am finding it very difficult to understand this tutorial ???
  11. Sorry but I forgot to mention just using a flatfile
  12. Hi I am trying to make a simple php admin page that allows the user to login and set some variables in settings.php What would be the easiest way to set this up? ??? Thanks
×
×
  • 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.