Jump to content

edd12345678

Members
  • Posts

    25
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

edd12345678's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi Guys, How can I send a session array through the URL and then use the values on the other page to create an SQL query? Any Ideas? Thanks in advance. Ed
  2. Hi everyone, Hope someone can help. Does anyone know why this is nor displaying any data? $qry = mysql_query("select * from product"); $data = array(); while($row = mysql_fetch_array($qry)){ $productName[] =$row['productName']; // Item name } for($i=0;$i<mysql_num_rows($row);$i++) { $data = $productName[$i]; } return $data; Thanks in advance Edd
  3. Thanks again for replying. I have managed to build an arra. The challenge nowi is to get the information from it in the correct format to send off to google checkouts. Is it possible to do this? I need the data displayed as below. So for each record stored in the array i will need to generate the below: $item_1 = new GoogleItem("product name ", // Item name "With S/N", // Item description $total_count, // Quantity 10.99); // Unit priceow? Thanks again for your help so far.
  4. Thankyou for your reply. Thats what I thought. What im struggling with is defining the array variable so that each row from the sql query is put into a seperate array and a new variable name for each product is created. eg. item1, item2 etc. Any ideas?
  5. Hi, I was wondering if someone can help. I am trying to implement a server to server Google checkout system on my website. I have built my own custom shopping basket which meets my needs however I need to get my data in the correct format to send off for the payment to be taken by Google checkout. At present I have a sql table called basket which stores all of the items that a user adds to thier basket. The google checkout examle requires the data in the below format: $item_1 = new GoogleItem("product name ", // Item name "With S/N", // Item description $total_count, // Quantity 10.99); // Unit price $item_1->SetURLDigitalContent('http://example.com/download.php?id=15', 'S/N: 123.123123-3213', "Download Item1"); $cart->AddItem($item_1); The above code is obviously for just the one item. Is it best to store the basket in a sql database and if so how would I go about retrieving the information from the database and then sending it to google in the above format bearing in mind there can be multiple items in the cart? Thanks in advance Edd
  6. Hi, Thankyou for your reply. I have now resolved the problem. I created a form to post the variables to another page. Then I saved them into a session variable and echoed them back on to the required page if that makes sense. Thanks anyway. Edd
  7. Hi, I wonder if I somebody can help me I have three drop down lists which are populated from data thats stored in my sql database. I also have a table which is echoed from the database all on the same page. What i want to do is allow users to select values in the drop down lists which will then echo different results below in the table. Is this possible. So on page load it will show all of the info in the html table. Then when the user changes the drop downs and clicks submit it will change the query to something SELECT dropdown1 value FROM users where Dropdown2 = 1 AND Dropdown3 = 2 etc. Is this possible to display this information on the same page using the dropdown list or does it need to load a different page as the client side is trying to edit a server side script? If its possible please can someone give me an example. Thanks in advance Edd
  8. Hi, Many thanks for your reply. Is the set timeout() needed for the timer or is it calling the submitFunction function every 5 seconds? At the moment I cannot get it to work. Also at the moment I do not have a form set up as such. I just have: if(isset($_POST["save"])){ Then run query } Thanks Edd
  9. Hello everyone, I wonder if anyone can help me. I have a timer which when the time expires I want any data in my form to be submitted to the database. Is it possible to use post without having a button to trigger it? So: e.g if(($_SESSION['endOfTimer'] - time()) < 0) { Insert values to the database? } How can I do this so it posts the data without the use of a button? Thanks in advance. Ed
  10. Hi, Thankyou for yoru replies. I do have more than one session variable in the quiz to handle other aspects of it but just really need to end the time variable although I guess I could end all of them to kill the timer. I have never used ajax calls before. Are they difficult? Is it possible to provide an example of how to end a session variable using one? Thanks again and apologies for my naivity . Edd
  11. Hi Everyone, I wonder if somebody could help me. I have been at this for hours and am really struggling. I have a timer which I have set up for a quiz. The quiz opens in a javascript shadow box. When the quiz is opened a session variable for the timer is set up to keep track of the time. What I need is for this session variable to end when the shadow box is closed. I have a onClose hook to peform actions when the shadow box is closed which is in javascript. Obviously I cannot end the session variable in the javascript function due to js being client side and php being server side. Has anyone any suggestions how I can resolve this issue. I need to end this session variable as if the user exits the quiz and then selects another quiz to do the timer uses the current time session rather than assigning the new time value for that particular quiz. Thanks in advance. Edd
  12. Thanks thats sorted it after a bit of research.
  13. Hi Guys, Not sure if this an be done but is it possible to check if a shadow box is closed by the user? The reason I ask is that I need to end a session variable depending on weather they have closed the window or not. Thanks in advance. Edd
×
×
  • 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.