Upload, SSL and more php help
Posted on
16th Feb 2014 07:03 pm by
admin
I recently just installed a ssl cert and do i use https for the whole site or just for the checkout.php and cart.php and login.php files?
whats the proper way to use https?
I have 2 more questions, when a customer purchases something, a finalized photo gets uploaded to our folders, now my questions are:
what is the proper command to use when u want a php file to execute longer then 30 seconds for bigger photos and slower connection?
how can i protect that folder from other people but still be able for a customer to see the picture he uploaded in his account with out stumbling on other peoples photos with out using a db to store the pictures?
for example mysite.com/files/pictures/
Now my questions are:
Code: [Select] $query = "INSERT INTO info (fname, lname) VALUES ('$fname','$lname')";
$result = mysql_query($query);
$custid = mysql_insert_id();
$custok = mysql_affected_rows();
$query = "INSERT INTO productb (customer_id, quantity, price, total) VALUES ('$custid','$quantity','$price','$total')";
$result = mysql_query($query);
$prodid = mysql_insert_id();
$prodok = mysql_affected_rows();
if($tname1 != null){
$fname1 = $prodid . 'a' . getmimetype($ftype1);
if(@move_uploaded_file($tname1, "$updir$fname1")){
}else{
mkdir($updir, 0755);
move_uploaded_file($tname1, "$updir$fname1");
}
}
Now that's the code i use now. What im trying to do is when a customer purchases a item, he uploads a photo. Now whats the proper way to handle the photo that will be used with a shopping cart system(btw i used _SESSION to store cart info)?
How long does the uploaded fie stay in the temp directory before i have to move it, because i was thinking it can stay there until the customer pays then it can be moved with the code above.
How do i make that photo private, so only the customer sees when he logs in his account to review the order.
btw im using paypal as a payment system.
No comments posted yet
Your Answer:
Login to answer
155
25
Other forums
update post issues
I am trying to create an update to a post function, while the update does occur, the page routing an
Echoing If Function?
A script I am using has If statements in the comments form to basically tell the form what to do. Cu
Problem with HTML form
Hello,
I made a HTML form with some fields and check box.
Everything works fine except whe
Data Function is Its Not working IN IE8
This is my first time to use formums. I hope i can get solution for this problem.
view plaincopy to
Displaying Multidimensional Arrays...about to put my head in a vice, PLEASE HELP
I am fairly new to PHP and MySQL and I have a problem which I have been trying to resolve for days.
Multi Level Array Problem
hi all,
For example I have array like below:
$temp = array(array('north america', 'us'
Login Control?!
I have a Web Site that uses the login control also I have set the destinationurl to the page I want
problem in program for counting no of chars using pointers
Hi all, I was trying to make a program which counts number of chars in a string using concpt of poin
Scrolling news bar and MySQL
I am not sure if this is the correct forum to post this on. If not, I apologize. I am still pretty
downloading a file as HTML
Hi.
I'm rather confused with forcing a download. I just want to save dynamic content (from $_SESS