Jump to content

simcoweb

Members
  • Posts

    1,104
  • Joined

  • Last visited

Everything posted by simcoweb

  1. In your query line: [code]<?php $sql = "INSERT INTO 'cust_tbl' VALUES ( '$title' '$firstname' '$surname' '$addline' '$addline' '$city' '$postcode' '$contact' '$email') )"; ?>[/code] You need to separate those values with commas. Like this: [code]<?php $sql = "INSERT INTO 'cust_tbl' VALUES ( '$title', '$firstname', '$surname', '$addline', '$addline', '$city', '$postcode', '$contact', '$email') )"; ?>[/code] Also, in this line: [code]<?php $rs = mysql_select_db( "dombar0_work", $conn ) or die( "Error selecting Db" ); ?>[/code] It says your database name is the same as your password ( "dombar0_work" for both ). Is that correct? If either is wrong then it won't work.
  2. Ok, Tracy..continuing here from your other thread. You've got some heavy hitters helping you here already. The only suggestion I can make is to use a different less complicated method. I just did something very similar for a client and it works like a charm. No checkboxes, though. Which, IMHO, complicate what you're trying to accomplish. You could easily display the product list and have text links pointing to the delete script and/or the update script. If that interests you then let me know.
  3. Tracy, I don't see any code in your first post. Is there another thread you started on this previously that includes that code?
  4. Go to www.hotscripts.com and search under PHP category for the word 'quiz'. There's gotta be a 100 at least.
  5. What do you mean you can't do it with a form in HTML? Is the 'action= ' tag pointing to a script that will perform the INSERT function into your database?
  6. http://www.raizlabs.com/Software/PHPeMailManager/
  7. Yeah, that's about as basic as it can get. Perhaps your host has a block on the PHP mail function due to spammers of something.
  8. Ok, then just for fun why don't you simplify your mail code to go like this: [code]<?php $to="youremail@yoursitename.com"; $subject="Zippity Doo Dah It Worked"; $message="By golly I think we found the problem!"; $from="Me, Myself and I"; mail($to, $subject, $message, $from); ?>[/code] See if it works.
  9. http://www.phpfreaks.com/quickcode/Checking-all-checkboxes-in-a-form/311.php
  10. Also, try using an error reporting in your code so you can see the actual mysql errors. Like this: $sql = "INSERT INTO '$user' VALUES('$linkname','$linkroute')"; mysql_query($sql) or die(mysql_error());
  11. I just noticed, your sql statement is missing the column names. Right now, the way it's written, it's trying to insert the two values into a table. It should name them like this: [code]<?php $sql = "INSERT INTO $user ('col_1', 'col_2') VALUES('$linkname','$linkroute')"; mysql_query($sql) ?>[/code]
  12. Try removing the single quotes from $user in your mysql statement.
  13. Are you using a blog, forum or CMS for handling these postings?
  14. Cool. Then just add this line: $user = $_POST['username']; To your code like this: [code]<?php if((isset($_POST['linkname'])&&(isset($_POST['linkroute'])))){ dbConnect(); echo"We are set"; $user = $_POST['username']; $linkname = $_POST['linkname']; $linkroute= $_POST['linkroute']; $sql = "INSERT INTO '$user' VALUES('$linkname','$linkroute')"; mysql_query($sql); } ?>[/code]
  15. Ok, but in that snippet of code there's no setting of the variable value like you've done with your $_POST statementss. So, if you're passing the value via a URL for example then you'd need a $_GET statement in there like this: $user = $_GET['userid']; If it's passed as a form field then add another $_POST statement for that. Then the mysql insert statement would know what to populate for that variable.
  16. This is done with longitude/latitude coordinates. These can be found in some free databases. Check at www.hotscripts.com under PHP / Zip Codes and you'll find them.
  17. Perhaps you're looking for a way to paginate your results? Meaning, it would display 10 results per page but place a Next 10 or page links to the other results?
  18. Yes, I followed all those and rebuilt apache as instructed. We use Cpanel/WHM system. Here's the instructions for upgrading to 5.0 from current 4.1: [quote]MySQL Version to use (you must run Software/Update Server Software (or /scripts/mysqlup) for this to take affect. You should then run buildapache/easyapache after changing this option. You may also need to run /scripts/perlinstaller --force Bundle::DBD::mysql. Updating from a previous version of MySQL to a later version is not automatically reversable. You should backup your databases if you think you might wish to downgrade in the future.[/quote] This was the same procedure going from 4.0 to 4.1. What I want to do now is upgrade to 5.0 but I don't know if this is going to make every script I have on the server going BOING! Last thing I need is to completely wipe out dozens of shopping carts, forums, bloggers, etc. So, not sure what to expect. The software programs using MySQL are your typical programs like Vbulletin, Coppermine, WordPress, etc. Any insight into if it's 'safe' or not and what I can expect would be greatly appreciated. :)
  19. The number of checkboxes will vary dependent upon the number of different sized bottles. So, there could be 2 or their could be 10. At least 1 of them needs to be selected. However, more than 1 can be selected. BUT, at LEAST 1 must be selected. In their current structure I have no idea how to 'loop' through these to determine if any of them are checked. Especially since the count can change. And, the names of each are different. The validation action has to occur when they hit the Add To Cart button which would then determine if they have selected any of the checkbox options related to the size/price of the product. Anyone have any ideas on how to write this?
  20. Hello: I operate my own server with RedHat Linux 3.0 Enterprise and recently upgraded the MySQL version from 4.0x to 4.1x in order to utilize some PHP/MySQL functions I needed for a script I wrote for a client (with much help and thanks to the crew here). Since I upgraded to that version of MySQL my server has been crashing literally 3-5 times per day. I've had the techies check all the hardware. Nothing wrong. I'm 99% convinced that there's something with this version upgrade that is clashing with either some software that's installed (typically some shopping carts using standard functions like Xcart) or that it's buggy. I have the option to upgrade from 4.1x to 5.0. Problem is I don't know if there's issues with 5.0, backwards compatibility issues, torrential death of biblical proportions, or..if it's safe to make the change and all my customer hosting accounts won't collapse in a heap of goo whereas i'll spend countless successive hours resintalling all their crap. I'm looking for a bit of guidance here if anyone has knowledge of the differences in these versions and what I can expect will happen. As always, thanks to anyone in advance for their assistance.
  21. heh...that would be some list! There's 1338 options. Plus, each time he adds a product he adds new options. There IS a table listing the options. Perhaps it could pull from there. Problem is that this cart is written in Perl. I know diddly squat about the code except for what I can logically piece together. What I was thinking is there could be some Javascript code written in order to check that at least 1 of the options shown for that product has been selected before they can successfully add the item to the cart. With just using some simple logic as a model, say there's 3 options for that product. Each option represents both a size and price (ex: 12 oz bottle, $15.50).  Then if ANY of the options are selected then Add To Cart is permitted. If NO options selected then alert message pops up. There could be as many as  5 or 6 options for any given product or perhaps just 2 depending on how many sizes it comes in (products are perfume). So, it's not set how many options there would be as a constant number. Ideas? Here's a URL to the site to a product detail page: [url=http://www.perfume.com.au/perfume--Maroussia-w--maroussia.html]http://www.perfume.com.au/perfume--Maroussia-w--maroussia.html[/url]
  22. simcoweb

    Fwrite

    Thanks to you and so many others...i'm learning!
×
×
  • 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.