Jump to content

Lodar

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

About Lodar

  • Birthday 02/21/1978

Profile Information

  • Gender
    Male
  • Location
    United Kingdom

Lodar's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I think I get what you mean, with the PayPal system the customer does not have to sign up to PayPal at all, they can just enter in there payment details as they would other sites, registering with PayPal is optional for a customer. But the PayPal developer center does cover this as well.
  2. In your form you could try adding 2 hidden input fields called cid and pid, that way when the form is sent you can then retrieve them as your other vars from the form. You would need to populate the value columns of the hidden field with the correct values, add the below before the buttons and especially before the end form tag <input type='hidden' name='cid' value='$cid'><input type='hidden' name='pid' value='$pid'>
  3. In the code you listed below your edit_caption function is not receiving any parameters, but your include file lists parameters to that function. Try passing across the relevant fields from the form to the function, if you have not already seen and corrected that.
  4. ok thanks for updating me, its good to know.
  5. No you need to use the new column it is now referenced as when you echo the results, so it will be revised_date you need to use. By echoing DepartureDate you are getting the original value before you applied the formatting. As thorpe has said, you really need to type in the names of the fields you require and not use *, so as an example it would be SELECT col1, col12, col3 FROM table1 WHERE col1 BETWEEN '$here' AND '$there' ORDER BY col1 desc;
  6. You could use a session to hold the supplier id. How is the supplier ID populated in the first place? Is it stored in a table say against there username? Do you require them to input the supplier id? If it is held in the users table, then when they have authenticated to login, before you redirect them to another page you can retrieve the supplierid from the appropriate table and hold it in a session var called supplierid. Then just use $_SESSION['supplierid'] instead of $supplierid in your insert statement. Also is the supplierid column set to be null or not null? If you require it I would set it to be not allow null values.
  7. Is there a text field or hidden input in the form that contains the value for the supplierid var? If no then the $_POST['supplierid'] wont contain any value at all. I cant really tell from you code as not all of the form is there.
  8. If for example someone added an article via your form to the database and the email was a confirmation the article was added. I would add to the database first, and if no errors adding the article to the database then send the email, otherwise don't send it. It really depends on what the relationship between the data entry in the database and the purpose of the email is.
  9. I would first echo out each of the vars that you test with the if statements on the page directly and see what values are being stored in them. Also what output are you expecting to see when you are getting a blank page? As a debug step, put a an echo before, after and during the if statements to check what is happening during the execution of the if statements. something along the lines of echo 'Start check of var 1'; if($varone <> 0) { echo 'I am now inside the if statement checking var 1'; } echo 'end of check of var 1';
  10. In the PayPal developers center, click the tab for Help Center and then look under the Website payments standard section. The PayPal shopping cart and Cart upload sections should allow you to add more than one item at time.
  11. If you go to https://developer.paypal.com/ and sign up, PayPal does allow you to send individual item information to there own cart system. The PayPal developer center should address your needs.
  12. In your query you could use CURRENT_TIMESTAMP for the field in place of $date and it will input in the correct format, depending on what column type you have lastLoginDate set to (I.E DATE, TIME or TIMESTAMP)
  13. The quickest way would be to modify the table structure you have there to include a new column called num_posts which is incremented each time the user makes a new post. Then you can order the query results on the num_posts column so your final table structure will look like id username num_posts Its the way I have always done mine, and cuts down on potentially long queries finding all the posts that the user made in the database
  14. From what I can see, your switch statement is looking for the a variable called action, looking through your code there is no var passed back to the script called that. In the $result_final where you build the form to submit, you have the buttons named edit and delete, but not action. I would change the name of the buttons to action and then change either the case in the switch to be the same as the value in the button. Or you could change the value part of the buttons to match what you have in the switch. So as an example if you keep the switch statement the same then you would change your submit buttons to the below <input type="submit" name="action" value="Edit"> <input type="submit" name="action" value="Delete"> Try those suggestions and see how you get on.
  15. What happens when you include my code with yours? Have you got the code so that the message var is populated as follows? $message="Upload: ".$where_form_is."/files/".$image_list[0]." $message .= "\n"; $message .= "Name: " . $_POST['name'] . "\n"; $message .= "Email: " . $_POST['email'] . "\n"; $message .= "PShip: " . $_POST['pship'] . "\n"; $message .= "PShip 2: " . $_POST['pship2'] . "\n"; $message .= "\n"; Are you using POST or GET on your forms method? And the fields you wish to move across are known as those field names you gave?
×
×
  • 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.