Jump to content

redgtsviper

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Posts posted by redgtsviper

  1. Here is my SQL code, can you tell me why it is not working

     

     

    <?php require_once('Connections/siteData.php'); ?>

    <?php

    mysql_select_db($database_siteData, $siteData);

    $query_Recordset1 = "SELECT * FROM images";

    $Recordset1 = mysql_query($query_Recordset1, $siteData) or die(mysql_error());

    $row_Recordset1 = mysql_fetch_assoc($Recordset1);

    $totalRows_Recordset1 = mysql_num_rows($Recordset1);

     

    mysql_query("INSERT INTO images VALUES ('$newNmae')");

     

    ?>

  2. Ok, I don't know if I am doing this right but and help would be great, I am still very green @ php. below you will find my code. In this page I have established a database connect already. the file uploads perfectly with my new name. My real question is how can I put my new file name in my database form my variable $newName. What would be the proper code to do this?

     

     

    <?php

     

    // Generate Random Number

    srand(time());

    $random = (rand()%99999999);

     

    // Add Random Number to First of File Name

    $newName="$random"."_"."$file_name";

     

    // Copy to Fold Append New File Name

    if($file_name !="")

    {

    copy ("$file", "images_upload/$newName")

    or die ("could not copy file");

    }

    else { die(); }

     

    //DISPLAY INPUT/OUTPUT

    echo"Old File Name is: $file_name<br>";

    echo"File Size is: $file_size<br>";

    echo"File Type is: $file_type<br>";

    echo"Random Number is: $random<br>";

    echo"New File Name is: $newName";

    ?>

  3. Here is the error




    Notice: Undefined variable: Name in C:\Inetpub\wwwroot\pixelart\Ortho RX\contact_ty.php on line 94

    Notice: Undefined variable: Practice in C:\Inetpub\wwwroot\pixelart\Ortho RX\contact_ty.php on line 96

    Notice: Undefined variable: Address in C:\Inetpub\wwwroot\pixelart\Ortho RX\contact_ty.php on line 98

    Notice: Undefined variable: City in C:\Inetpub\wwwroot\pixelart\Ortho RX\contact_ty.php on line 100

    Notice: Undefined variable: State in C:\Inetpub\wwwroot\pixelart\Ortho RX\contact_ty.php on line 100

    Notice: Undefined variable: ZipCode in C:\Inetpub\wwwroot\pixelart\Ortho RX\contact_ty.php on line 100

    Notice: Undefined variable: PhoneNumber in C:\Inetpub\wwwroot\pixelart\Ortho RX\contact_ty.php on line 102

    Notice: Undefined variable: emailAddress in C:\Inetpub\wwwroot\pixelart\Ortho RX\contact_ty.php on line 104

    Notice: Undefined variable: Comment in C:\Inetpub\wwwroot\pixelart\Ortho RX\contact_ty.php on line 106

    Notice: Undefined variable: InservicePreference in C:\Inetpub\wwwroot\pixelart\Ortho RX\contact_ty.php on line 108

    Notice: Undefined variable: ContactPreference in C:\Inetpub\wwwroot\pixelart\Ortho RX\contact_ty.php on line 110

    Notice: Undefined variable: toaddress in C:\Inetpub\wwwroot\pixelart\Ortho RX\contact_ty.php on line 115

    Notice: Undefined variable: emailAddress in C:\Inetpub\wwwroot\pixelart\Ortho RX\contact_ty.php on line 117

    Notice: Undefined variable: Email_Address in C:\Inetpub\wwwroot\pixelart\Ortho RX\contact_ty.php on line 118

    Notice: Undefined variable: emailAddress in C:\Inetpub\wwwroot\pixelart\Ortho RX\contact_ty.php on line 118

    Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Inetpub\wwwroot\pixelart\Ortho RX\contact_ty.php on line 120
  4. I am built this simple form on a website. Below I have posted both the form code and the php code on the processing page whats is going on with this. It is on a windows server that has PHP installed and configured



    FORM


    <form action="contact_ty.php" method="post" name="form1" onSubmit="VF_form1();return false;">
                  <table width="97%" border="0" cellspacing="0" cellpadding="3" id="formStyled">
                    <tr bgcolor="#E8FFFA">
                      <td width="27%" align="right" valign="top">&nbsp;</td>
                      <td width="73%" align="left" valign="top"></td>
                    </tr>
                    <tr bgcolor="#E8FFFA">
                      <td align="right" valign="top"><font size="2" face="Verdana">Name:</font></td>
                      <td align="left" valign="top"><font size="2" face="Verdana">
                        <input name="Name" type="text" id="Name" size="40">
                      </font></td>
                    </tr>
                    <tr bgcolor="#E8FFFA">
                      <td align="right" valign="top"><font size="2" face="Verdana">Practice: </font></td>
                      <td align="left" valign="top"><font size="2" face="Verdana">
                        <input name="Practice" type="text" id="Practice" size="40">
                      </font></td>
                    </tr>
                    <tr bgcolor="#E8FFFA">
                      <td height="32" align="right" valign="top"><font size="2" face="Verdana">Address:</font></td>
                      <td align="left" valign="top"><font size="2" face="Verdana">
                        <input name="Address" type="text" id="Address" size="40">
                      </font></td>
                    </tr>
                    <tr bgcolor="#E8FFFA">
                      <td align="right" valign="top"><font size="2" face="Verdana">City:</font></td>
                      <td align="left" valign="top"><font size="2" face="Verdana">
                        <input name="City" type="text" id="City">
                      </font></td>
                    </tr>
                    <tr bgcolor="#E8FFFA">
                      <td align="right" valign="top"><font size="2" face="Verdana">State: </font></td>
                      <td align="left" valign="top"><font size="2" face="Verdana">
                        <input name="State" type="text" id="State" size="3" maxlength="2">
                      </font></td>
                    </tr>
                    <tr bgcolor="#E8FFFA">
                      <td align="right" valign="top"><font size="2" face="Verdana">Zip: </font></td>
                      <td align="left" valign="top"><font size="2" face="Verdana">
                        <input name="ZipCode" type="text" id="ZipCode">
                      </font></td>
                    </tr>
                    <tr bgcolor="#E8FFFA">
                      <td align="right" valign="top"><font size="2" face="Verdana">Phone&nbsp;Number: </font></td>
                      <td align="left" valign="top"><font size="2" face="Verdana">
                        <input name="PhoneNumber" type="text" id="PhoneNumber">
                      </font></td>
                    </tr>
                    <tr bgcolor="#E8FFFA">
                      <td align="right" valign="top"><font size="2" face="Verdana">Email
                          Address: </font></td>
                      <td align="left" valign="top"><font size="2" face="Verdana">
                        <input name="emailAddress" type="text" id="emailAddress" size="30">
                      </font></td>
                    </tr>
                    <tr bgcolor="#E8FFFA">
                      <td align="right" valign="top"><font size="1" face="Verdana">Comments:</font></td>
                      <td align="left" valign="top"><font size="2" face="Verdana">
                        <textarea name="Comment" cols="37" rows="5" id="Comment"></textarea>
                      </font></td>
                    </tr>
                    <tr bgcolor="#E8FFFA">
                      <td align="right" valign="top">&nbsp;</td>
                      <td align="left" valign="top"><p><font size="2" face="Verdana"><br>
              Which type of In-Service do you prefer? </font></p>
                          <p><font size="2" face="Verdana">
                            <input name="InservicePreference" type="radio" value="Web Conference">
              Web conference <br>
              <input name="InservicePreference" type="radio" value="On-site In-Service">
              On-site In-Service</font></p>
                      </td>
                    </tr>
                    <tr bgcolor="#E8FFFA">
                      <td align="right" valign="top">&nbsp;</td>
                      <td align="left" valign="top"><p><font size="2" face="Verdana">How
                            would you like to be contacted to schedule this In-Service?</font></p>
                          <p><font size="2" face="Verdana">
                            <input name="ContactPreference" type="radio" value="Phone">
              Phone<br>
              <input name="ContactPreference" type="radio" value="Email">
              Email<br>
                          </font></p>
                      </td>
                    </tr>
                    <tr bgcolor="#E8FFFA">
                      <td align="right" valign="top">&nbsp;</td>
                      <td align="left" valign="top"><font size="2" face="Verdana">                       
                        <input type="submit" name="Submit" value="Submit">
                        </font></td>
                    </tr>
                    <tr bgcolor="#E8FFFA">
                      <td align="right" valign="top">&nbsp;</td>
                      <td align="left" valign="top">&nbsp;</td>
                    </tr>
                  </table>
                  <p>&nbsp; </p>
                </form>




    SCRIPT ON SECOND PAGE

    <?php

    $msg = "OrthoRx Contact Page Submission\n\n";

    $msg .= "Name: $Name\n\n";

    $msg .= "Practice: $Practice\n\n";

    $msg .= "Address: $Address\n\n";

    $msg .= "City: $City, State: $State  ZipCode: $ZipCode\n\n";

    $msg .= "Phone Number: $PhoneNumber\n\n";
     
    $msg .= "Email Address: $emailAddress\n\n";
     
    $msg .= "Comments: $Comment\n\n";
     
    $msg .= "In-Service: $InservicePreference\n\n";

    $msg .= "Contact Preference: $ContactPreference\n\n";



    // Edit if it is nessecery
    $to = "$myemail@mydomain.com";
    $subject = "CONTACT PAGE FROM OrthoRx WEBSITE";
    $mailheaders = "From: OrthoRx Contact Page Submission Form <$emailAddress>\n";
    $mailheaders .= "Reply-To:$Email_Address <$emailAddress>\n\n";
    // Mail to address
    mail ( $to, $subject, $msg, $mailheaders );

    ?>
  5. Is there a way I can have a single form field on a page and when I enter something into it and click submit, have the info added into my URL.

    Here is may sampe code. I am sure that I am going about this all wrong





    <html>
    <head>
    <title>Test</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body>
    <form name="form1" method="post" action="../folder/$idNo">
    <input name="idNo" type="text" id="idNo">
    <input type="submit" name="Submit" value="Submit">
    </form>
    </body>
    </html>
  6. Can anyone tell me what is wrong with this code



    # phpMyAdmin MySQL-Dump
    # [a href=\"http://phpwizard.net/phpMyAdmin/\" target=\"_blank\"]http://phpwizard.net/phpMyAdmin/[/a]
    #
    # Table structure for table 'users'
    #

    CREATE TABLE users (
    user_id mediumint(9) NOT NULL auto_increment,
    first_name varchar(15) NOT NULL,
    last_name varchar(30) NOT NULL,
    email varchar(40) NOT NULL,
    username varchar(40) NOT NULL,
    password varchar(40) NOT NULL,
    registration_date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
    PRIMARY KEY (user_id)
    );
  7. I am using the following code to send form content to my email address. I am having problems with spam. What can I do to fix this problem. I would like to avoid image varification. Any code would be very helpful. I am new to PHP

    <?php

    $msg = "My Website Online Contact Submission\n";

    $msg .= "Name: $name\n";
    $msg .= "Comments: $emailAddress\n\n";
    $msg .= "Comments: $phone\n\n";
    $msg .= "Comments: $message\n\n";





    $to = "me@mydomain.com";
    $subject = "CONTACT FROM WEBSITE";
    $mailheaders = "From: Website Submission Form <$emailAddress>\n";
    $mailheaders .= "Reply-To:$Email_Address <$emailAddress>\n\n";
    // Mail to address
    mail ( $to, $subject, $msg, $mailheaders );

    ?>
  8. I have a form on my contact page that has the following fields Name, Email Address, Message. This form is on my contact.htm page.

    When the info is submitted it goes to my contact.php to send the info to my email address. Below is the code that I am currently using to send emails. I am needing a way to modify what I have and make it where spammers cannot attack it and send out spam. I am new to PHP.


    <?php
    $msg = "My Website Online Contact Submission\n";
    $msg .= "Name: $name\n";
    $msg .= "Comments: $emailAddress\n\n";
    $msg .= "Comments: $phone\n\n";
    $msg .= "Comments: $message\n\n";

    $to = "me@mydomain.com";
    $subject = "CONTACT FROM WEBSITE";
    $mailheaders = "From: Website Submission Form <$emailAddress>\n";
    $mailheaders .= "Reply-To:$Email_Address <$emailAddress>\n\n";
    // Mail to address
    mail ( $to, $subject, $msg, $mailheaders );
    ?>
  9. I saw a post where you where talking about php form spam. Can you explain your code to me a little bit more. I am new to php


    <?php
    if (isset($_POST))
    foreach($_POST as $k=>$v)
    if (stristr(strtolower($v),'content-type:')) {
    //
    // send a tracking email back to your self giving details of the attempt
    //
    exit();
    }
    ?>




    -------- Here is the code I am currently using --------



    <?php

    $msg = "My Website Online Contact Submission\n";

    $msg .= "Name: $name\n";
    $msg .= "Comments: $emailAddress\n\n";
    $msg .= "Comments: $phone\n\n";
    $msg .= "Comments: $message\n\n";


    $to = "me@mydomain.com";
    $subject = "CONTACT FROM WEBSITE";
    $mailheaders = "From: Website Submission Form <$emailAddress>\n";
    $mailheaders .= "Reply-To:$Email_Address <$emailAddress>\n\n";
    // Mail to address
    mail ( $to, $subject, $msg, $mailheaders );

    ?>
  10. I am using the following code to send form content to my email address. I am having problems with spam. What can I do to fix this problem. Any code would be very helpful. I am new to PHP

    <?php

    $msg = "My Website Online Contact Submission\n";

    $msg .= "Name: $name\n";
    $msg .= "Comments: $emailAddress\n\n";
    $msg .= "Comments: $phone\n\n";
    $msg .= "Comments: $message\n\n";





    $to = "me@mydomain.com";
    $subject = "CONTACT FROM WEBSITE";
    $mailheaders = "From: Website Submission Form <$emailAddress>\n";
    $mailheaders .= "Reply-To:$Email_Address <$emailAddress>\n\n";
    // Mail to address
    mail ( $to, $subject, $msg, $mailheaders );

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