Jump to content

bigshwa05

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bigshwa05's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey everyone, I'm fairly new to PHP. I'm really at the point where I can perform simple tasks or make modifications to pre-written scripts. I am helping out with a charity golf tournament website and i need to create a registration form where users can sign up and then be directed to paypal. Once they have paid the registration fee i need their information to be logged with a note that their donation/payment has been recieved. The donation will always be the same amount as it covers a round of golf and dinner. Im not really sure if i could tackle something like this from scratch, so i was wondering if anybody out there knew of a script that could perform such a function without too much technical knowledge or even a tutorial. I've done some research and reading on the paypal site but i'm not having any luck
  2. BIGINT was my next thought too but still no luck...I dont get it  ???
  3. Hi Jess, Yes i changed it to that because it was the maximum length acceptable I have never seen anything like this before so i thought it was best to just max it out and cross my fingers....but no luck!! :(
  4. Oh its an INT with Length/Values set to 255
  5. Hey Everyone, I'm fairly new to php and programming in general but i've been making out pretty well. I've run into another road block though.  I have a form setup that enters users contact info into a MySQL database.  Its been working great for the last month but now it has hit row #862 and it no longer is capturing records.  There is a thing at the bottom of the php admin that says cardinality 862 so i m assuming this is limiting the entries and now blocking new ones! How can i increase that?  I am afraid to think how many entries i have already lost  :(
  6. wow quick reply! Unfortunetley that also is excluding any words following the first space i put in.  :(
  7. After hours of endless searching of google for some help or information on this issue i thought i'd reach out to the community. I am trying to use a very simple PHP script to process the contents of a standard html form.  The problem that's occurring is the FULL NAME field cuts off everything after the first word. ie. if i enter Billy Ray Cyrus in the FULL NAME textbox when the form is processed and transmitted all that is included is Billy. ??? I am trying to use the FULLNAME textbox to populate the sender line of the email. Here is the form and the code i am using to process it any help would be greatly appreciated. //*****HTML FORM***** <form method="post" action="sendmail.php"><table width="100%" border="0">   <tr>     <td width="21%">       Full Name: </td>     <td width="79%"><input name="fullname" type="text" /></td>   </tr>   <tr>     <td>Email:</td>     <td><input name="email" type="text" /></td>   </tr>   <tr>     <td>City:</td>     <td><input name="city" type="text" /></td>   </tr>   <tr>     <td>Apply to: </td>     <td>       <select name="applyto">         <option value="hr1@hrcompany.com">Mr. Bean</option>         <option value="hr2@hrcompany.com">Mrs. Corn</option> <option value="hr3@hrcompany.com">Ms. Carrot</option>         </select>     </td>   </tr>   <tr>     <td>Position:</td>     <td><select name="position">         <option value="Promotional Rep">Promotional Rep</option>         <option value="Demonstrator">Demonstrator</option> <option value="Field Manager">Field Manager</option> <option value="Cosmetic Demonstrator">Cosmetic Demonstrator</option> <option value="Hair Stylist">Hair Stylist</option> </select></td>   </tr> </table>         <br>         Please Copy and Paste Your Resume :<br> <textarea name="resume" rows="15" cols="60"></textarea> <br> <input type="submit"> </form> // **** PHP SCRIPT TO PROCESS FORM DATA ****** <body> <?php $to = $_REQUEST['applyto'] ; $subject =  $_REQUEST['position'] . " + " . $_REQUEST['city'] ; $email = $_REQUEST['email'] ; $message = $_REQUEST['resume'] ; $headers = "From:$fullname"; $sent = mail($to, $subject, $message, $headers) ; if($sent) {print "Your mail was sent successfully"; } else {print "We encountered an error sending your mail"; } ?> </body> </html>
  8. I am trying to create a form to uplaod an image along with some form data. I can get the form to write the text values into the database however the image does not seem to upload. I m not sure what to try next! <? //connect mysql_connect("myHost","userName","password"); //select which database you want to edit mysql_select_db("dataBase"); ?> <? //initilize PHP if($_POST['submit']) //If submit is hit { //convert all the posts to variables: $bizname = $_POST['bizname']; $bizwebsite = $_POST['bizwebsite']; $bizcategory = $_POST['bizcategory']; $bizdescription = $_POST['bizdescription']; $imagename = $_FILES['image']['name']; copy ($_FILES['image']['tmp_name'], "../images/".$_FILES['image']['name']) or die ('Could not upload'); $result=MYSQL_QUERY("INSERT INTO bizdir ( id, bizname, bizwebsite, bizcategory, bizdescription imagename)". "VALUES ('NULL', '$bizname', '$bizwebsite', '$bizcategory', '$bizdescription','$imagename')"); echo '<p>test</p>'; } else { // close php so we can put in our code ?> <form method="post" action="addbiz.php"> <TABLE> <TR> <TD>Business Name:</TD> <TD><INPUT TYPE='TEXT' NAME='bizname' VALUE='Random Name' size=60></TD> </TR> <TR> <TD>Website:</TD> <TD><INPUT TYPE='TEXT' NAME='bizwebsite' VALUE='' size=60></TD> </TR><br> <TR> <TD>CATEGORY:</TD> <TD><INPUT TYPE='TEXT' NAME='bizcategory' VALUE='' size=60></TD> </TR> <TR> <TD>Description:</TD> <TD> <!-- You can use PHP functions to automatically get the value of time --> <TEXTAREA NAME='bizdescription' VALUE='description' rows="10" cols="30"></TEXTAREA> </TD> </TR> <TR> <TD>Image:</TD> <TD> <!-- You can use PHP functions to automatically get the value of time --> <input type="file" name="image"> </TD> </TR> <TR> <TD></TD><br> <TD><INPUT TYPE="submit" name="submit" value="submit"></TD> </TR> </TABLE> </form> <? } //close the else statement ?>
  9. Hi there, This is the first time i ve worked with the GD library. I am very new to php so heres what i am trying to do. I have created a simple HTML Form that looks like so. ############################# <form action="php.php" method="$_POST" enctype="multipart/form-data"> Upload Image: <input type="file" name="imagename"> <font size="1">Click browse to upload a local file</font> <input type="submit" value="Upload Image"> </form> ############################# Now i am trying to use this PHP script named php.php to accept the image from that form and process it accordingly <?php // Get File and set new size $filename = $_GET["$imagename"]; $percent = 0.5; // Content type header('Content-type: image/jpeg'); // Get new sizes list($width, $height) = getimagesize($filename); $newwidth = $width * $percent; $newheight = $height * $percent; // Load $thumb = imagecreatetruecolor($newwidth, $newheight); $source = imagecreatefromjpeg($filename); // Resize imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); // Output imagejpeg($thumb); ?> ################### The form seems to be passing the files name over to the form but it is not actually passing the image which is what i would like. Any advice would be greatly appreciated. Bigshwa
×
×
  • 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.