Jump to content

jpratt

Members
  • Posts

    144
  • Joined

  • Last visited

    Never

Everything posted by jpratt

  1. i think i figured it out. thanks for the help.
  2. I would not have the time for this until monday as I am going out of town. Please let me know if you still need it then.
  3. or just create one table as that is how they belong.
  4. This would be a very simple app. Would only need a few simple SELECT, UPDATE, and DELETE statements and a few pages. nothing to difficult. Just read up on some simple principles of mysql and read up on php and how to interact with a mysql db and you should not have any problems with it. A day or two worth of reading should have you up and going.
  5. why do you need two tables then? what would be the purpose? Why not have 1 table with 3 fields?
  6. my question is this: is there a relation between town and price? can each town have many prices? or does one town have one price and one price have one town? I am failing to understand what you are doing with town and price.
  7. I have the following Select box: [code]<select name="faq_Model[]" size="3" multiple class="inputbox" id="faq_Model[]">                   <?php do {  ?>                   <option value="<?php echo $row_Model['Model_Name']?>" ><?php echo $row_Model['Model_Name']?></option>                   <?php } while ($row_Model = mysql_fetch_assoc($Model)); ?> </select> [/code] And the following on the post of the form: [code] if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { for($i=0;$i<count($_POST['faq_Model']);$i++) { $Model.=$faq_Model[$i]." "; }   $insertSQL = sprintf("INSERT INTO faq (faq_Model, faq_Cat, faq_Order, faq_Q, faq_A) VALUES (%s, %s, %s, %s, %s)",                       GetSQLValueString($Model, "text"),                       GetSQLValueString($_POST['faq_Cat'], "int"),                       GetSQLValueString($_POST['faq_Order'], "int"),                       GetSQLValueString($_POST['faq_Q'], "text"),                       GetSQLValueString($_POST['faq_A'], "text"));   mysql_select_db($database_database, $database);   $Result1 = mysql_query($insertSQL, $database) or die(mysql_error());   $insertGoTo = "index.php";   if (isset($_SERVER['QUERY_STRING'])) {     $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";     $insertGoTo .= $_SERVER['QUERY_STRING'];   }   header(sprintf("Location: %s", $insertGoTo)); } [/code] My problem is it is not passing anything from the multiple select box. Any ideas why? I have really never messed with multiple selects in php and might need a little advice on this, Thanks.
  8. My mysql_connect() is in my external file i included at the top of my file, so that is not the problem. That is where $linkID comes from. But yes I left the $ in front of my array on those lines. Thanks.
  9. I have the following code: [code] <?php   //ini variables and get values   $fname = $_POST['fname'];   $minitial = $_POST['minitial'];   $lname = $_POST['lname'];   $email = $_POST['email'];   $phone = $_POST['phone'];   $altphone = $_POST['altphone'];   $address = $_POST['adress'];   $city = $_POST['city'];   $state = $_POST['state'];   $zip = $_POST['zip'];   $country = $_POST['country'];   $interested = $_POST['interested'];   $experience = $_POST['experience'];   $teaching = $_POST['teaching'];   $lessonhubexp = $_POST['lessonhubexp'];   $bio = $_POST['bio'];   $personalinfo = $_POST['personalinfo'];   $webconference = $_POST['webconference'];   $contact = $_POST['contact'];   $hoursmonth = $_POST['hoursmonth'];   $felony = $_POST['felony'];   $felonyexp = $_POST['felonyexp'];   $inetconnection = $_POST['inetconnection'];   $webcam = $_POST['webcam'];   $computer = $_POST['computer'];   $sound = $_POST['sound'];   $terms = $_POST['terms'];     $errors = array();     //do serverside validation of required fields for those that have javascript turned off   if ($fname = "") {   $errors[] = "First Name";   }   elseif ($lname = "") {   $errors[] = "Last Name";   }   elseif ($email = "") {   $errors[] = "Email Address";   }   elseif ($phone = "") {   $errors[] = "Phone Number";   }   elseif ($address = "") {   $errors[] = "Address";   }   elseif ($city = "") {   $errors[] = "City";   }   elseif ($state = "") {   errors[] = "State";   }   elseif ($zip = "") {   errors[] = "Zip/Postal Code";   }   elseif ($country = "") {   errors[] = "Country";   }   elseif ($interested = "") {   errors[] = "Your Teaching Interests";   }   elseif ($bio = "") {   errors[] = "Biography";   }   elseif ($personalinfo = "") {   errors[] = "Personal Information";   }     $size = sizeof($errors);     if ($size == 0) {   //connect to db and insert values   mysql_select_db("lessonhub", $linkID);   $insert = "INSERT INTO Instructor (FName, MI, LName, Address1, City, StateProvidence, PostCode, Phone1, Phone2, Country, Bio, Email, TeachInterest, YearExperience, WorkForLH, YearofTeach, InterestLH, WebInterview, ContactInt, TenHour, Felony, FelExplain, IntSpeed, webcam, goodComputer, soundCard, terms) VALUES ($fname, $minitial, $lname, $address, $city, $state, $zip, $phone, $altphone, $country, $bio, $email, $interested, $experience, $lessonhubexp, $teaching, $personalinfo, $webconference, $contact, $hoursmonth, $felony, $felonyexp, $inetconnection, $webcam, $computer, $sound, $terms)";   if (mysql_query($insert, $linkID)) { print "Your application has been sent sucessfully. We will contact you shortly to complete the process."; } else { print "There was an error sending your application. Please go back and submit your information again."; }   }   else {   print "Please go back and fill out the following items:<br>"; foreach ($errors as $value) { print "$value<br>"; }   }   ?> [/code] It gives me a blank screen with no errors. Anyone see where I am going wrong?
  10. Yeah its also why I asked what I did on the first reply. :)
  11. try using the complete path. mkdir("/home/lordofth/public_html/images/player/$userid");
  12. Your code is <form action="emailtdelete.php"  should that be "><form action="emaildelete.php"
  13. you said your code page is emaildelete.php not emailtdelete.php correct?
  14. I think <?= $uRow[0]?> should look like <? echo $uRow[0]; ?>
  15. is your page that can not be found called emailtdelete.php? does it have a t in it?
  16. Correct, php is used for dynamic content and web programming. html is for page format and layout. You should look into html and css.
  17. what if you tried adding a set of parens around your if statement like so and use the and operator instead: [code] if (($name == "") || (($company == "") && ($email == ""))) { [/code]
  18. just set up a table for Invoices and add the fields you need. Add an admin page for you to input authcode invoice number and target url into your db. then on the users page when they click submit it checks the two fields they entered and redirects them to the target url accosiated with there query.
  19. i sent you a pm on this for more details
  20. [quote]No, this is something that i would generate and print on to their invoice for them...[/quote] So are you generating your own ivoices or does paypal allow you to put custom fields on their invoices?
  21. is the authorization code and invoice number part of paypals url?
×
×
  • 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.