Search the Community
Showing results for tags 'e-commerce'.
-
So I am looking at developing a jobsboard, which has three tables: Company - Store details of companies looking to advertise jobs, build profile. Jobs - Store details of Jobs being advertised for a certain period of time. Orders - Store details of the transactions for the jobs being posted. The way it works is the company completes registration form, then has the option of posting jobs which they will be charged a fix fee. Now what foreign key would I store in the Orders table? since I am using Paypal and don't know how much information you can carry over. Would I store the CompanyID or the JobsID or both? PHP5 MySQL 5 Chrome
-
Hi all, This is not a question. But if you want to create a button in PayPal that is dynamic and accepts values from your scripts, you may find this useful: When creating a Button in your Business Account, there are 3 steps. Under Step 2 ("Track Inventory, profit & loss (optional)", un-tick "Save button at PayPal". Now the button you created, will not be hosted by PayPal and you can pass on values, e.g.: <input type="hidden" name="email" value="<?php echo $_SESSION['email']; ?>"> PayPal offers of tonnes of information but it took me hours and quite some headache to figure this one out. I hope, others will at least benefit from my agony! Regards, Michael
-
Hi, I have a question for uploading image part in add_print.php. Usually you would get rid of temporary file on the server after moving the file to the permanent location ( ex) ../uploads/$_FILES['image']['name'] ). However, in "add_print.php" file, it shows you delete the original file (the code like this below:) // Delete the uploaded file if it still exists: if ( isset($temp) && file_exists ($temp) && is_file($temp) ) { unlink ($temp); } If you go up to the beginning part of this code, you will see : // Check for an image: if (is_uploaded_file ($_FILES['image']['tmp_name'])) { // Create a temporary file name: $temp = '../uploads/' . md5($_FILES['image']['name']); // Move the file over: if (move_uploaded_file($_FILES['image']['tmp_name'], $temp)) { echo '<p>The file has been uploaded!</p>'; // Set the $i variable to the image's name: $i = $_FILES['image']['name']; } else { // Couldn't move the file over. $errors[] = 'The file could not be moved.'; $temp = $_FILES['image']['tmp_name']; } } else { // No uploaded file. $errors[] = 'No file was uploaded.'; $temp = NULL; } When the file is uploaded, $temp means the original file that is pointing to the permanent location.($temp = '../uploads/' . md5($_FILES['image']['name']); I thought you only delete the temporary file after moving the file to the permanent. Why do you delete the original file? Also Why do you not delete the temporary file after the file is moved to the permanent location? It would be appreciated if you can give me some explanation. Thanks.