Jump to content

gristoi

Members
  • Posts

    840
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by gristoi

  1. You just need to remove the members_id from the insert query. Example: Insert into members ( username, firstname, lastname, password, register_date, ip) VALUES ( username, firstname, lastname, password, register_date, ip) The members_id field will auto increment upon insertion for you
  2. You might want to look at using the Dialog window from the Jquery javascript library. Can come in very handy. With it you can bind all matter of functions and callbacks to a bespoke button. Have a look at http://docs.jquery.com/UI/Dialog
  3. Hi, it might be a bit of overkill for what you need but you could try looking at using Zend_Form. This has the ability to let you set validators for each field, such as integers, alphanumeric etc..., without using JavaScript. But you will need a basic understanding of using objects. Have a look here http://framework.zend.com/manual/en/zend.form.html for more info. Hope that helps
  4. Thanks for the correction DavidAM. I am new to this forum and should have doubled checked my query first. Your spot on about not needing a left join ( my bad)
  5. sounds like a permissions issue on the folder. you need to make sure that the folder has the correct read write permissions set
  6. ok, from your table structure this should give you what you need: For example $_GET['book_id] = $id SELECT b.book_title AS Title, b.book_price AS Price, c.customer_name, p.purchase_date FROM purchases p LEFT JOIN customers c ON (p.customer_id = c.customer_id) LEFT JOIN books b ON (p.book_id = b.book_id) WHERE p.book_id = $id If you only want to get the most recent purchase of the book then try adding this to the end of the query: ORDER BY p.purchase_date desc LIMIT 1 hope this helps
  7. by the look of it that is just a typo in the contact_config.php, the 'City where jobsite is located' part is actually pulling the comments: ."<br>City where jobsite is located: ".$_POST['posText'] should be: ."<br>Comments: ".$_POST['posText'] . To save going over old code i think what you want is this: $message = "Site visitor information: <br><br> Name: ".$_POST['posName'] ."<br>E-mail: ".$_POST['posEmail'] ."<br>Phone: ".$_POST['posRegard'] ."<br>Location Details: <br>City: ".$_POST['posCity'] ."<br>State: ".$_POST['posState'] ."<br>Zip Code: ".$_POST['posZip'] ."<br>User Comments: ".$_POST['posText']; that should get you on your way
  8. Ok, So your going to want to change the section of the form from: <tr> <td><label for="posCountry">Country:</label></td><td><input class="input_contact" type="text" size="25" name="posCountry" id="posCountry" value=""/> </td> </tr> to: <tr> <td><label for="posCity">City:</label></td><td><input class="input_contact" type="text" size="25" name="posCity" id="posCity" value=""/> </td> </tr> <tr> <td><label for="posState">State:</label></td><td><input class="input_contact" type="text" size="25" name="posState" id="posState" value=""/> </td> </tr> <tr> <td><label for="posZip">Zip Code:</label></td><td><input class="input_contact" type="text" size="25" name="posZip" id="posZip" value=""/> </td> </tr> and in your config_contacts.php change: ."<br>Country: ".$_POST['posCountry'] to: ."<br>City: ".$_POST['posCity'] ."<br>State: ".$_POST['posState'] etc ......................... hope that helps
  9. Hi, I'm afraid I only had a quick glance at this before. What is it that you are trying to achieve in the email? Have you got an example of what you want the email to look like?
  10. Could you post your table structures
  11. Hi nevell, One thing straight away that is going to cause you an issue are your header declarations in your contacts.php. if you echo out your headers you have an extra " escaping the string. Change: $headers .= "From: \"".$_POST['posName']; to: $headers .= "From: ".$_POST['posName']; and $send = mail("$mailto","$subject","$message","$headers"); to: $send = mail($mailto,$subject,$message,$headers); hope this points you in the right direction
  12. Hi, you would be better if you declared the fields to insert into: mysql_query("INSERT INTO categories (`fileda`, `fieldb`) VALUES ('$cName', '$cDesc')") or die(mysql_error()); where field a and field b are the names of the two fields that you wish to insert the values into. The error message you are getting is basically telling you that you have an extra " in your query. This is more than likey being passed into the query by either $cName or $cDesc. echo out these variables and make sure $cName = bob and not "bob"
×
×
  • 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.