Jump to content

oceans

Members
  • Posts

    514
  • Joined

  • Last visited

    Never

Everything posted by oceans

  1. Jitesh, Thanks for being with me I have 5 pages, Page 1 in header $session_id = md5(time()); session_id($session_id); session_start(); Page 1 in body header('location: Page2.php?session_id='.$session_id); Page 2 in header session_id($_REQUEST['session_id']); session_start(); Page 2 in body header('location: Page3.php?session_id='.$session_id); . Page 3 in header session_id($_REQUEST['session_id']); session_start(); Page 3 in body header('location: Page4.php?session_id='.$session_id); Page 1 ok, page 2 ok, but in page 3, I get the following: " Warning: session_start() [function.session-start]: The session id contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in C:\wamp\www\Page3.php on line 4 " line 4 is "session_start();" I also noted that one new session file is being created as i walk from page 1 to 3
  2. Jitesh, I have some problem, this is what I did for sending session id to next page(s), I have a chain of page which requires input from previous. header('location: PageX.php?session_id='.$session_id); in the next page header $session_id = session_id($_REQUEST['session_id']); then body header('location: PageX.php?session_id='.$session_id); somthing is wrong can you help. Yes, I want to implement
  3. I am putting in your new instructions Is it " location('header:page2.php?session_id?session_id='.$session_id); " or " header('location: page2.php?session_id='.$session_id); "
  4. Jitesh, I tried your method. (1) Index.php $session_id = md5('projectname_'.time()); session_id($session_id); session_start(); (2) All other page session_start(); It works well, I do not know is it reliable as I have not done your latest instruction. But in accordence with your latest instructions I have one concern, if I walk from page to page using PHP I can do your instruction what if I walk from page to page via html hyperlink. In my case yes I do both. Please advice, one interesting thing with I used php 4 i did not have this problem, I tried with yahoo, same set of codes.
  5. Jitesh is OFFLINE, Can any one help, thanks...
  6. I wish to replace "projectname_" with some run time random alphanumeric to make it little more robust it is OK? by the way i noted the used sessions files are littered in the session folder, it is the server's job to clear after timeout or is it my job to clear using my php code?
  7. As normal I have 1 start page and all links. thus am I right to say the following goes to the first page $session_id = md5('projectname_'.time()); session_id($session_id); session_start(); the following goes to all the session involved pages session_start();
  8. I am open, I am willing to handle it myself I do not know If I would have talked to you earlier on this. Can you please advice the following: The maxlength for session file name. I will create random alphanumeric and name the file, then use the file, but the problem is how would I know if the random named file is already in use?
  9. Jitesh, Is it a IE problem?
  10. one sec how do I check ver of my ie?
  11. Friends, Has any one encountered the following problem: When I open two or more IE windows on the same computer, both the IE windows are NOT starting different session files at my server, the first one starts a file and all uses the same file! Is this normal? I understand that each client should open a unique file right! Even if all the clients are coming from the same PC? I don’t do any thing special, I just simply declare like the following: <?php ob_start(); session_start(); $_SESSION['SessionVariable01']=0; ?> Got I got to do any setup at my server?
  12. Friend, Your method works, killing variable one by one is hard in my case.
  13. What does " isset($_SESSION['here'] " does? It looks for the presence of the variable or the value (here)? So I have to set a value and clear as and when required is it? I am doing in WAMP, testing phase should be publishing soon after ironing out staffs...
  14. Teng84, Sounds Sound, give me time, I work out and let you know...
  15. I have 5 groups of pages; In each group, there are few pages; the "next" page requires information from "this" page in the same group. When the user walkes from, say mid of Group 2 to start of Group 1, start page of Group 1 should flush all content of the session file...
  16. No, it is not working, I belive the session file gets removed this way, thus no session data for the next page, also I believe it should be " if($_SESSION['count']==1) "
  17. Please give me 1 min, I am thinking and trying...
  18. Friend I was polite, ok I will take you as my friend, address you Teng84. Please take a look at my extract of my typical page, this is a log in page... <?php ob_start(); session_start(); session_destroy(); $_SESSION['0101LogInTo0201Member01']=0; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body> <?PHP $NumberOfTxtBoxes=2; $NumberOfTxtBoxesMustBeFilled=2; //Transfer Data from Screen to Memory if (isset($_POST['Submit'])) { for ($i=1; $i<=$NumberOfTxtBoxes; $i++) { $InputFromScreen[$i]=strip_tags(trim(strtoupper($_POST["Txt".$i]))); } } else { for ($i=1; $i<=$NumberOfTxtBoxes; $i++) { $InputFromScreen[$i]=""; } } ?> <form id="form1" name="form1" method="post" action="0101LogIn.php"> <td class="PHPRunTime"><?PHP //Checking for Unfilled Fields $TxtBoxesNotFullyFilled=0; for ($i=1; $i<=$NumberOfTxtBoxesMustBeFilled; $i++) { if ($InputFromScreen[$i]=="") { $TxtBoxesNotFullyFilled=1; break; } } if ($TxtBoxesNotFullyFilled==1) { echo "All Fields Should be Filled!"; } else { if ($InputFromScreen[2]!=$InputFromDataBase[1]) { //Password Does Not Match echo "Incorrect Email Address or Password!"; } else { //Send Email Address to Next Page $_SESSION['0101LogInTo0201Member01']=$InputFromScreen[1]; header("location: 0201Member.php"); } } ?> </td> </form> </body> </html> PS. As with unset I need to specify all variables individually, I want one shoot all dead! I will never know which group my viewer came from prioer to this page.
  19. Dear Tang84, I am sorry, I misled you, yes "session_destroy();" does its job perfect, but I can't use session variables after that instruction, yes, I will post my code "extract" as my page runs a bit long please give me 1 min... thanks....
  20. Dear People, I have a concern pertaining my session variables handling, I am using quite a bit of session variables (properly declared and named). I have grouped a few sets of pages, I want to clear all the session variables (immaterial of which group of pages they belong) when any page group begins. I tried placing session_destroy(); in the beginning of the header, since I post my pages to itself for validation, it DOES NOT work as per my intention. Thus can any one suggest how could I remove the entire content in the session file without caring about the session variables name. Thanks. FYI this is what I did at first few lines in the header " <?php ob_start(); session_start(); session_destroy(); ...... "
  21. Dear People, Does anyone know what is the max length of the password we can give for mysql database user?
  22. Dear Yesideez, You are right, I am with you and confirm any visible article is copyright by default! But I believe the original poster of this topic is concerned about his codes being stolen, ie the method, since it is on a written form copywrite also covers. From technical point of view, I believe php files only sends the results to a browser, thus unless someone gets to the server in another way it is impossible to read the php code, thus we should count on our server security, I think.
  23. Dear people, Isn't copy write act happens by default! We should be concerened about the "method" happeneing in the php file, but since php file give only the result to the web browser, the method is safe as well right, unless some one tries to take a peek into the php file...this way we should secure our server right. correct me if I am wrong
×
×
  • 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.