Jump to content


New Members
  • Posts

  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Sinan's Achievements


Newbie (1/5)



  1. We have too little information to help you out it's like asking to chop a tree without having a tree. We need to see some code.
  2. You don't need to do that if your array is setup correctly with each product having its' own unique key. May I see your array? Grouping by description is not recommended I would recommend to group by id. Off-topic: I think you should take a look at SQL it could make things a lot easier for you.
  3. Could you tell what exactly you are trying to do? What's your goal? Because what you are asking is very unusual since you can't stop a loop from "restarting". You can select keys individually however. Like so: $product_description = $products[0]['product_description']; But I don't know how your array looks like and I am not clear on what you are trying to do.
  4. Why would you use sessions for this? If I were to do this I would just delete my sessions and retry. I found this on google which might be helpful. Good luck!
  5. array(0) { } Thats what it returns I am almost sure it must be in the PHP settings but I dont know what exactly it is. It works on my laptop where I have set up my own webserver. But on the VPS (where the problem happens) I use appserv. And I used to have it earlier with appserv and he changed it either in the apache or php settings
  6. <?php $login = file_get_contents("tpl/contents/login.html"); if(isset($submitlogin)){ //Query setup $loginquery = "SELECT UserID, Password FROM Login WHERE UserID='".mssql_real_escape_string($username)."' AND Password='".$password."'"; $loginresult = mssql_query($loginquery); $countrows = mssql_num_rows($loginresult); if($countrows == 1){ $_SESSION['username'] = $username; $_SESSION['password'] = $password; } if($countrows != 1){ $login .= "<span style='color:red'>Login Failed</span>"; } } echo $_SESSION['username']; //Get template $template = str_replace("%ucp%", $login, $template); ?> Its included in a file where session_start(); has been used and I tested it with other ways too like <?php $_SESSION['username'] = "test"; echo $_SESSION['username']; ?> When I remove $_SESSION['username'] = "test"; It doesnt echo it anymore
  7. The sessions do save I have checked the directory, but somehow it doesnt work at all. I cannot call the session after going to another page. I am sure the code is correct I have tested it on many ways. It must be my PHP or apache settings but I have no idea what and where it is.
  8. I always kept wondering what the differences between MySQL and MSSQL is and if it is a lot different Could someone tell me the differences or link me to a place where it is being told? I am currently learning MySQL but yea I wanna know MSSQL too Thanks in advance, Sinan
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.