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 Like 25 Dislike
Previous forums Next forums
Other forums

Good Programming and Web Design Books
Hi,

I recived a pm today from a fellow phpfreaker regarding php books, i replied with the fo

php multiple action on submit
I have a form which says:

<form enctype='multipart/form-data' method='post' action='pr

Scene graph using Direct3D?
There are several C++ scene graph based packages available for OpenGl, like say OSG,

http://w

Taylor Series Function
So I am working a a project for my intro C++ class, and I am having some trouble with a function for

MVC - Code review
I'm in the process of trying to wrap my head around MVC, and as part of that, I'm attempting to impl

Pagination won't carry results past page 2.
Hi all,

I've worked out my pagination script and its paginating fine until I click next from

problem with php server update from mid 2009
Hi,

I have this navigation menu on 2 websites which used to work just fine. After a recent up

Load file in PHP
I have 2 files. The first is a PHP generated XML file that's dependent by 2 inputs. The second is a

Problem with DB connection
Hello there! I'm new to this forum and I'm new to PHP coding also. I wrote something that doesn't ma

BIG file upload!
Hey guys!

I'm trying to upload a file, it works well with smaller files but with 60mb+, I get

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash