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
Alterar a hora do servidor
Se alguém souber, ajude-me a adicionar 6 horas, obrigado
<tr>
&
Variable passed to each() is not an array or object
Hi,
This is a email a friend type of form, and it isn't working anymore.
<?
Keep newlines from textarea?..
I'm creating a simple encoding program, and what I want it to do is retain the newlines, as echoing
Echo Tweaking help!
HI. I would like to have the output of the entered variables repeat forever, but it's stopping at th
Recode Abap Dynpro into Web Dynpro
Hi All,
A client has asked us to look at rearchitecting a custom transaction that was developed
JSON SORT WITH PHP
I have two products that I want to sort by say "Id:17, value: xxx" using php
The page w
Using mysql_real_escape_string for displayed content
On my website users can input data into a textarea and it will store it in the mysql database. But,
Escape Latin Characters
I need to escape latin characters in an xml doc. Example: "é" is escaped to "é". I thoug
Feed Maker
Hi all.
First of all I must say I am not a php developer so I am afraid I don't know much about i
if php cookie set, show code...
Hi all.. I need to figure out this little snippet right quick.. seems like it should be easy enough