Jump to content

jwwceo

Members
  • Posts

    212
  • Joined

  • Last visited

Everything posted by jwwceo

  1. I have been staring at this query for an hour. It gives me a SYNTAX error. Any ideas?? James $query="INSERT INTO user ( name_last, name_first, email, password, username, address_home, city_home, state_home, zip_home, country_home, phone_home, address_bill, city_bill, state_bill, zip_bill, country_bill, phone_bill, citizenship) VALUES ( {$_SESSION['name_last_v']}, {$_SESSION['name_first_v']}, {$_SESSION['email_v']}, {$_SESSION['password_v']}, {$_SESSION['username_v']}, {$_SESSION['address_home_v']}, {$_SESSION['city_home_v']}, {$_SESSION['state_home_v']}, {$_SESSION['zip_home_v']}, {$_SESSION['country_home_v']}, {$_SESSION['phone_home_v']}, {$_SESSION['address_bill_v']}, {$_SESSION['city_bill_v']}, {$_SESSION['$state_bill_v']}, {$_SESSION['$zip_bill_v']}, {$_SESSION['$country_bill_v']}, {$_SESSION['$phone_bill_v']}, {$_SESSION['$citizenship_v']})";
  2. Thanks guru, I had seen that one before, but I was looking for one that opened only when you left the site - as opposed to just leaving the page where the script is. (They may surf to another internal page - at that point I don't want the script to run) Has anyone seen anything out there for that?
  3. I should probably get some sort of rookie hazing for this question, but here goes. I'm trying to create an exit-survey upon leaving my site -- a pop-up that appears when someone leaves. I've looked on the net for a tutorial, but so far no luck. Any ideas?
  4. I have a variable in date format YYYY-MM-DD. How do I parse out the YYYY, the MM, and the DD so I can use them on their own??? James
  5. I have a databse with an auto incrementing primary key , called reservation_id. the values in this field were auto incrementing fine. 1..2..3..and so on. I decided to make the reservation_id the same as my order number so I just edited the last entry to be somehing like 8427861, thinking the auto increment would juct increase from there...but now whenever I run an INSERT query, I get this error: Error: Duplicate entry '127' for key 1 with query INSERT INTO reservations (package_id, user_id, ccnum, exp_date, avs, total, num_people) VALUES('5', '6', '4111111111111111', '0108', '123', '180', '3') Any ideas??? James
  6. $query="INSERT INTO reservations (package_id,user_id,ccnum,exp_date,avs,total,num_people,) VALUES('$_SESSION['packageid_v']','$_SESSION['user_id_v']','$_SESSION['ccnum_v']','$_SESSION['expdate_v']','123','$_SESSION['total_v']','$_SESSION['numpeople_v']')"; I get an T_ENCAPSED_AND_WHITESPACE error. But can't see why? JW
  7. I have a simple shopping cart nearly done for a reservation system I am writing... but I need some help connecting to Authorize.net. From what I understand, I gather the variables and put them into an array, which gets sent to Authorize.net. They then send me back a response, and I go decipher their response and act accordingly... I guess I am just curious how this all works. For example, this is supposed to be done with POST, but won;'t that then take me to their page. How do I stay on my page while their page is thinking and then get the reply. Does it just post back to my page, and I need to set up some if statements, looking for whether or not POSTS are set. I'm just a littel confused. Any help would be awesome since I need this done very fast!!! James
  8. THANK BOTH YOU GUYS FOR THE HELP. LOOKS LIKE THE TUTORIAL I WAS USING IS BIT OLD!!!!
  9. I am having some trouble with Sessions. If I register a session variable like this: $permission ="no"; session_register("permission"); Shouldn't I be able to use $permission on all my pages which have the session start tag a the top??? I have this at the very top of my next page and I get no response: <?php session_start(); echo "{$permission}"; JW
  10. This may be a Javascript question...but I am curious what the best way to validate data is? I mean things like making sure a phone number is correct, or that the double entry passwords match. I could do this is php but I seem like I would need a page refresh. I am looking for something that maybe throws one of those little javascript error boxes??? Thanks for any tips!! James
  11. I have a query which shows all the rows for certain conditions. I am using while($info = mysql_fetch_array( $data )) for my loop to output each row. I would like there to be a message saying "Nothing to edit" if the rows are empty. I tried this: if (empty ($info)){ echo "<p><h2>There are no packages to edit</h2></p>"; } But I get this message no matter what. I am thinking that $info has no value after the loop. What other variable can I use??? James
  12. I have a client who needs me to build him a simple reservation system in 4 days. It has to go live on Monday. The site is pretty basic, but because there is short time, I want to just lay down my overall idea code wise and see if anyone sees any major problems or has any feedback. The site needs users to be able to choose from about 10 different vacation packages. They need to be able to enter their user information when they register and then login later to see their account and reservation details. Here are the tables I plan to use: 1. User Table ( name, email, phone, address, etc) 2. Vacation Package Table ( title, description, # of slots, dates, price, etc) 3. Reservations. (This will include a user_id and a Package_id as well as some details about the reservation such as the day it was made etc. I need to tie the order into Authorize.net ( which I have never done before-please tips!!!) and also create 2 admin sections. One for the users to login and see their reservations and one for the administrators to add excursions and review excursion data. The reservation system needs to check if there are enough slots left to facilitate the reservation and if there is no room, recommend a different package, I am not sure if I should use sessions or cookies for the user sessions. For the admin back end I was just going to use htaccess to make it secure. Any tips so that I do not waste time would be awesome. This is a big client and theres no room for mistakes. JW
  13. There was 1 line of incorrectly commented lines in my database connection file. this was counting as output I guess... the error setting showed me where it was. THANKS!!!!
  14. Yes, the code is being completed. I get the output that the delete was successful, but then the empty form again...
  15. It just doesn't redirect. It goes back to the same page, but the form is empty. So the delete query is working. It just isn't redirecting.
  16. Hello, I have a page where the header has stopped working. It used to work fine. There is no output before the header tag. Is there maybe an apache setting that disallows header functions? James <?php include 'library/config.php'; include 'library/opendb.php'; error_reporting(0); $shirt_id = $_GET['shirt_id']; if(isset($_POST['delete'])) { $query = "DELETE from shirts WHERE shirt_id='$shirt_id'"; $result = mysql_query($query) or die("Error: ". mysql_error(). " with query ". $query); mysql_query("DELETE FROM shirtkeywords WHERE shirt_id = '$shirt_id'") or die (mysql_query()); mysql_query("DELETE FROM shirtcolors WHERE shirt_id = '$shirt_id'") or die (mysql_query()); header("Location: http://www.liquidcotton.com/admin"); }
  17. Well maybe you could help me out. I need a simple system to book reservations for flights within 1 week!!!. The site is not too complex outside of that. Would you be willing to share/sell your thoughts? JW
  18. Hello, I am in charge of making a simple reservation system for a client. Anybody know of an open source system which may get me started? James
  19. I have a site which indexes t-shirts and make it easy to find shirts from many different stores at the same time. Each shirt has a link in the database. I want a way to maybe run a cron job once a week or so to pull all the links from the database and make sure they still work, in case a product has been discontinued. I am thinking there will have to be some kind of criteria to verify that the page the robot surfs to is still a valid product page...for example an expired product page may simply default to that sites homepage. So it would still return a page...but the shirt is still expired. Any ideas how to approach this or which functions to use. I have no idea really. James
  20. Yes, I tested in Firefox and it worked for me...this is the code I am using. Is there anything fundamentally wrong that wouldn't work in some browsers. This function is attached to the last image to load.. function slide_load() { document.getElementById("example_7").style.display = 'none'; document.getElementById("example_9").style.display = 'none'; document.getElementById("example_6").style.display = 'block'; document.getElementById("example_8").style.display = 'block'; }
  21. Thanks. I got it to work...your post helped a ton. I ended up putting the onload event on the last arrow, which doesn't load until all the loops for products are done.. you can see it here: http://www.boozingtees.com/slideshow.php?cat=252 Thank!!!!
  22. I have a slideshow on my website which needs to load about 25 images which are 640 by 480....so it takes a few seconds. While loading these images are splashed in the middle of the slide show area and it looks pretty bad. I'd like to hide this DIV until the page is done loading and replace it with a little loading icon animated gif. I know I will need to probably cover one DIV with another one, or hide the slideshow div and replace it with the animated gif, until the page is done loading. But I an not too familair with Javascript...so any pointers in the right direction would help out a ton. Best, James
  23. I have this query(below), which I am using to update a field in my database. I am doing this in phpMyAdmin. But I have to run it 17 times, once for each color, times and would like to merge all queries into one so in the future I can run it just once. Here's an individual query: UPDATE xcart_variants, xcart_class_options, xcart_variant_items SET xcart_variants.color_id ='ffffff' WHERE xcart_variants.variantid = xcart_variant_items.variantid AND xcart_variant_items.optionid = xcart_class_options.optionid AND xcart_class_options.option_name = 'Black' and here's what I have for a multiple query: UPDATE xcart_variants, xcart_class_options, xcart_variant_items SET xcart_variants.color_id ='432c00' WHERE xcart_variants.variantid = xcart_variant_items.variantid AND xcart_variant_items.optionid = xcart_class_options.optionid AND xcart_class_options.option_name = 'Brown' SET xcart_variants.color_id ='020950' WHERE xcart_variants.variantid = xcart_variant_items.variantid AND xcart_variant_items.optionid = xcart_class_options.optionid AND xcart_class_options.option_name = 'Navy' SET xcart_variants.color_id ='000000' WHERE xcart_variants.variantid = xcart_variant_items.variantid AND xcart_variant_items.optionid = xcart_class_options.optionid AND xcart_class_options.option_name = 'Black' SET xcart_variants.color_id ='ffffff' WHERE xcart_variants.variantid = xcart_variant_items.variantid AND xcart_variant_items.optionid = xcart_class_options.optionid AND xcart_class_options.option_name = 'White' Any ideas why I am getting errors?? James
×
×
  • 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.