Jump to content

ramboangel11

Members
  • Posts

    32
  • Joined

  • Last visited

    Never

Posts posted by ramboangel11

  1. $sql = "DELETE FROM $table WHERE id = '$_POST[id]'";$result = mysql_query($sql, $connection) or die(mysql_error());

     

    you need to define the name of the table you are deleting the user id from.

     

    then:

    WHERE id='$id'

    instead of the post id.

     

     

    Hopefully that works for you.

  2. I'm not getting anything and I've added false emails to the email list. Also, they are coming from "anonymous" and not the email I put in the from field.

     

    
                    $headers .= "From: myemail@aol.com" . "\r\n";
    $headers .= "Error-To: <" . "email@aol.com" . ">\r\n";
    $headers .= "Return-Path: <" . "email@aol.com" . ">\r\n";
    $headers  = 'MIME-Version: 1.0' . "\r\n";
                   $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    
    

  3. I have a table in my database named newsletter, with a field named email. Is there a way in php to delete the row with email address field if the email is undeliverable to that email address because it no longer exists?

     

    Thank you in advance!

  4. This is what I've tried with getting rid of $get_info:

     

     

    print "\t<td><font face=arial size=1/>{['name']}</font></td>\n";
    print "\t<td><font face=arial size=1/>['name']</font></td>\n";
    print "\t<td><font face=arial size=1/>$name</font></td>\n";
    

     

     

    This is what my code looks like:

     

    $result = mysql_query( "SELECT name, price, thumbnail FROM s01_Products ORDER BY RAND() LIMIT 1" )
    or die("SELECT Error: ".mysql_error());
    $num_rows = mysql_num_rows($result);
    print "<table width=200 border=1>\n";
    while ($get_info = mysql_fetch_row($result)){
    print "<tr>\n";
    print "\t<td><font face=arial size=1/>{$get_info['name']}</font></td>\n";
    print "\t<td><font face=arial size=1/>{$get_info['price']}</font></td>\n";
    print "\t<td><img src=\"{$get_info['thumbnail']}\"></td>\n";
    print "</tr>\n";
    }
    print "</table>\n";

     

    Nothing is printing. The image shows up as broken. Phoo.

  5. MySQL client version: 5.0.77

     

    My code works fine. Displays what I want. However, I want to display the "thumbnail" field as an image, rather than text. I feel like my mind is too boggled from too many tutorials, and I feel like a rookie! The name and price should be displayed as text, which they are, and the thumbnail field is displaying the image filename, and I'd like it to display the image itself.

     

    Help, please? Thank you in advance!

     

     

    $result = mysql_query( "SELECT name, price, thumbnail FROM s01_Products ORDER BY RAND() LIMIT 1" ) 
    or die("SELECT Error: ".mysql_error()); 
    $num_rows = mysql_num_rows($result); 
    print "<table width=200 border=1>\n"; 
    while ($get_info = mysql_fetch_row($result)){ 
    print "<tr>\n"; 
    foreach ($get_info as $field) 
    print "\t<td><font face=arial size=1/>$field</font></td>\n";
    print "</tr>\n"; 
    } 
    print "</table>\n"; 

  6. OKAY, now the email sends with this code:

     

    <?php

    $ebits = ini_get('error_reporting');

    error_reporting($ebits ^ E_NOTICE);

     

      $name = $_REQUEST['name'] ;

      $email = $_REQUEST['email'] ;

      $message = $_REQUEST['message'] ;

     

     

      if (!isset($_REQUEST['email'])) {

       

     

      }

      elseif (empty($name) || empty($email) || empty($message)) {

     

     

        header( "Expires: Mon, 20 Dec 2008 01:00:00 GMT" );

        header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );

        header( "Cache-Control: no-cache, must-revalidate" );

        header( "Pragma: no-cache" );

     

        }

     

    ?>

     

     

        <html>

        <head>

        <title></title>

        <style type="text/css">

        p {font-family: arial; font-size: 16px; color: #000000;}

        p1 {font-family: arial; font-size: 24px; color: #000000;}

        </style>

        </head>

        <body style="background-color: #a1e4a4;">

        <p1>ERROR</p1>

        <br /><br />

        <p>Please go back and fill in all fields completely.</p>

        </body>

        </html>

     

       

    <?php

     

        mail( "myemail@domain.com", "Contact Form Results",

          $message, "From: $name <$email>" );

     

        header( "Location: thankyou.htm" );

     

    ?>

     

    So it sends successfully, but this is what it redirects to after you hit submit. I must be missing something...

     

     

    ERROR

     

    Please go back and fill in all fields completely.

     

    Warning: Cannot modify header information - headers already sent by /TEST/sendmail.php on line 48

     

    :(

  7. <?php

    $ebits = ini_get('error_reporting');

    error_reporting($ebits ^ E_NOTICE);

     

      $name = $_POST['name'] ;

      $email = $_POST['email'] ;

      $message = $_POST['message'] ;

     

     

      if (!isset($_POST['email'])) {

       

     

      }

      elseif (empty($name) || empty($email) || empty($message)) {

     

     

        header( "Expires: Mon, 20 Dec 2008 01:00:00 GMT" );

        header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );

        header( "Cache-Control: no-cache, must-revalidate" );

        header( "Pragma: no-cache" );

     

     

        ?>

     

     

        <html>

        <head>

        <title></title>

        <style type="text/css">

        p {font-family: arial; font-size: 16px; color: #000000;}

        p1 {font-family: arial; font-size: 24px; color: #000000;}

        </style>

        </head>

        <body style="background-color: #a1e4a4;">

        <p1>ERROR</p1>

        <br /><br />

        <p>Please go back and fill in all fields completely.</p>

        </body>

        </html>

     

       

        <?php

     

      }

      else {

     

        mail( "myemail@domain.com", "Contact Form Results",

          $message, "From: $name <$email>" );

     

        header( "Location: thankyou.htm" );

     

      }

     

    ?>

     

     

    Hello again! Php hates me on different servers...

     

    This is my code to send the maill to my email. I get no errors returned, and it redirects to the thankyou page like it successfully sent the email, however, no email in my inbox, and none in spam either...

     

    All  my variables are labeled correctly, and the action of my form is set to this .php page. Why won't I get an email?

     

    Help!!!

     

     

    Thank you!

  8. Well I want to validate each text-field of my form.

     

    Let me tell you this:

     

    I originally had each individual barrier in a  list. However, I couldn't figure out how to get all of the variables into the body of the email (i was tired, it was late) so my sister suggested I concatenate them into one array. Worked after a little bit of tweaking.

     

    Well, I'd like to make my form as secure as possible, so I realized I need to validate each variable (especially since I don't want to receive blank forms AT ALL).

     

    I hope that's a good explanation.

     

    Thanks!

  9. $message = "Referrer's Name: {$_POST['TEXT_20']}\nPosition: {$_POST['TEXT_21']}\nAgency: {$_POST['TEXT_4']}\nEmail: {$_POST['TEXT_2']}\nDate: {$_POST['TEXT_5']}\nPhone: {$_POST['TEXT_6']}\nClient's Name: {$_POST['TEXT_7']}\nBirthdate: {$_POST['TEXT_8']}\nSSN: {$_POST['TEXT_9']}\nRace: {$_POST['TEXT_10']}\nGender: {$_POST['TEXT_11']}\nStreet Address: {$_POST['TEXT_12']}\nCity: {$_POST['TEXT_13']}\nZip Code: {$_POST['TEXT_14']}\nCounty: {$_POST['TEXT_15']}\nSchool: {$_POST['TEXT_16']}\nCurrent Placement: {$_POST['TEXT_1']}\nParent/Guardian Name: {$_POST['TEXT_22']}\nRelationship: {$_POST['TEXT_23']}\nHome Phone: {$_POST['TEXT_24']}\nCell: {$_POST['TEXT_25']}\nWork: {$_POST['TEXT_26']}\nMedicaid No: {$_POST['TEXT_27']}\nPeachCare No: {$_POST['TEXT_28']}\nOther: {$_POST['TEXT_29']}\nServices Needed: {$_POST['TEXT_30']}\nReason for requesting IFIS: {$_POST['TEXT_AREA_3']}\n5-21 yrs old? {$_POST['TEXT_31']}\nAt risk of out of home placement? {$_POST['TEXT_32']}\nMental Health Diagnosis? {$_POST['TEXT_33']}\nExpressed ideations or attempted suicide or homicide? {$_POST['TEXT_34']}\nCommitted acts of physical or verbal aggression against a parent, teacher, or peer? {$_POST['TEXT_35']}";

         

       

        if ($_SERVER['REQUEST_METHOD'] == 'POST') {

     

       

        mail( "myemail@aol.com", "Referral Form Results",

          $message, "From: example@aol.com" );

     

        header( "Location: http://www.example.com" );

     

        }else{

          die("Direct access not allowed!");

        }

     

     

    I've been searching for awhile now on how to validate each individual element of my array $message, and I just can't seem to figure it out. Nothing works! Does anybody know how to validate each element without having to revamp my whole code?

  10. $message = "{$_POST['$TEXT_1']}{$_POST['$TEXT_20']}{$_POST['TEXT_21']}{$_POST['TEXT_4']}{$_POST['TEXT_2']}{$_POST['TEXT_5']}{$_POST['TEXT_6']}{$_POST['TEXT_7']}{$_POST['TEXT_8']}{$_POST['TEXT_9']}{$_POST['TEXT_10']}{$_POST['TEXT_11']}{$_POST['TEXT_12']}{$_POST['TEXT_13']}{$_POST['TEXT_14']}{$_POST['TEXT_15']}{$_POST['TEXT_16']}{$_POST['TEXT_3']}{$_POST['TEXT_AREA_3']}{$_POST['TEXT_17']}{$_POST['TEXT_18']}";

     

    Where can I insert PHP LINE BREAKS? \n?

  11. Array

    (

        [TEXT_1] => jij

        [TEXT_20] => jio

        [TEXT_21] => ji

        [TEXT_4] => jo

        [TEXT_2] => i

        [TEXT_5] => ijk

        [TEXT_6] => bh

        [TEXT_7] => vt

        [TEXT_8] => f

        [TEXT_9] => b

        [TEXT_10] => ji

        [TEXT_11] => ji

        [TEXT_12] => bg

        [TEXT_13] => j

        [TEXT_14] => b

        [TEXT_15] => nb

        [TEXT_16] => bvt

        [TEXT_3] => jio

        [TEXT_AREA_3] => vy

        [TEXT_17] => vubiu

        [TEXT_18] => n

    )

    1

     

    all those letters are me just fudging the form. :)

  12. <?php

        $message = "{$_POST['TEXT_1']}{$_POST['TEXT_20']}{$_POST['TEXT_21']}{$_POST['TEXT_4']}{$_POST['TEXT_2']}{$_POST['TEXT_5']}{$_POST['TEXT_6']}{$_POST['TEXT_7']}{$_POST['TEXT_8']}{$_POST['TEXT_9']}{$_POST['TEXT_10']}{$_POST['TEXT_11']}{$_POST['TEXT_12']}{$_POST['TEXT_13']}{$_POST['TEXT_14']}{$_POST['TEXT_15']}{$_POST['TEXT_16']}{$_POST['TEXT_2']}{$_POST['TEXT_3']}{$_POST['TEXT_4']}{$_POST['TEXT_5']}{$_POST['TEXT_6']}{$_POST['TEXT_7']}{$_POST['TEXT_8']}{$_POST['TEXT_9']}{$_POST['TEXT_AREA_3']}{$_POST['TEXT_14']}{$_POST['TEXT_15']}{$_POST['TEXT_16']}{$_POST['TEXT_17']}{$_POST['TEXT_18']}";

        $message = $_POST ['message'] ;

     

       

        if ($_SERVER['REQUEST_METHOD'] == 'POST') {

     

        mail( "ramboangel11@aol.com", "Referral Form Results",

          $message, "From: administration@creativeinterventionsinc.com" );

     

        header( "Location: http://www.creativeinterventionsinc.com" );

     

      }

     

    ?>

     

    Still blank emails. Sorry this is such a trouble!

  13. <?php

        $message = "{$_POST['TEXT_1']}{$_POST['TEXT_20']}{$_POST['TEXT_21']}{$_POST['TEXT_4']}{$_POST['TEXT_2']}{$_POST['TEXT_5']}{$_POST['TEXT_6']}{$_POST['TEXT_7']}{$_POST['TEXT_8']}{$_POST['TEXT_9']}{$_POST['TEXT_10']}{$_POST['TEXT_11']}{$_POST['TEXT_12']}{$_POST['TEXT_13']}{$_POST['TEXT_14']}{$_POST['TEXT_15']}{$_POST['TEXT_16']}{$_POST['TEXT_2']}{$_POST['TEXT_3']}{$_POST['TEXT_4']}{$_POST['TEXT_5']}{$_POST['TEXT_6']}{$_POST['TEXT_7']}{$_POST['TEXT_8']}{$_POST['TEXT_9']}{$_POST['TEXT_AREA_3']}{$_POST['TEXT_14']}{$_POST['TEXT_15']}{$_POST['TEXT_16']}{$_POST['TEXT_17']}{$_POST['TEXT_18']}";

        $message = $_POST ['message'] ;

     

        if (isset($_REQUEST['message'])) {

     

        }

        else{

     

     

        mail( "myemail@aol.com", "Referral Form Results",

          $message, "From: example@aol.com" );

     

        header( "Location: http://www.example.com" );

     

      }

     

    ?>

     

    Form name is still set to "message".

×
×
  • 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.