Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $userid = $_COOKIE['tempuser'];
- $prodarray = array();
- $sql = $db->prepare("SELECT * FROM basket where usercode = :userid");
- $sql->bindParam(':userid', $userid, PDO::PARAM_STR, 30);
- $sql->execute();
- $result = $sql->fetchAll();
- $numrows = $sql->rowCount();
- $i=0;
- if ($numrows > 0)
- {
- foreach($result as $row)
- {
- if ($row['contracttype'] != -1){
- $prodarray[$i]['contracttype'] = $row['contracttype'];
- $prodarray[$i++]['mobilenumber'] = $row['mobilenumber'];
- }
- $forename = $row['forename'];
- $surname = $row['surname'];
- $contactnumber = $row['contactnumber'];
- $email = $row['email'];
- $occupation = $row['occupation'];
- $companyname = $row['companyname'];
- $companynumber = $row['companynumber'];
- $address = $row['address'];
- $postcode = $row['postcode'];
- }
- }
- setcookie("tempuser", substr(sha1(rand()), 0, 30),-86400,'/');
- setcookie("tempuser", "",-86400,'/');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement