Jump to content

[SOLVED] url acting cRaZy


jakebur01

Recommended Posts

hey, sometimes the phpsession id pops up after the url occasionally. It comes and goes, especially after you wipe out you cache. Is there any way to prevent this from happening?

 

<?php 
  include ('book_sc_fns.php');
  // The shopping cart needs sessions, so start one
  session_start();
  do_html_header('Welcome to !');

// echo '<font color = #FF0000> <p><b>Select a category below or a brand from above.</b></p></font>';
  
?>





<?php 
  
  
  
echo "<TABLE BORDER=1 bgcolor=#FFFFFF bordercolor=RED bordercolorlight=#33CCFF bordercolordark=RED CELLSPACING=1 ALIGN=left>";
  
  
  
  echo "<tr><td>";
  echo "<b>Please select a category below</b>";

  // get categories out of database
  $cat_array = get_categories();

  // display as links to cat pages
  display_categories($cat_array);
  
  
  
  
  echo "</tr></td>";
  
  echo "</table>";

  ?>
<?php
  

  // if logged in as admin, show add, delete, edit cat links
  if(isset($_SESSION['admin_user']))
  {
    display_button('admin.php', 'admin-menu', 'Admin Menu');
  }
  do_html_footer(); 
?>
   

Link to comment
Share on other sites

Normally this is controlled by a couple php settings:  use_trans_sid and user_only_cookies.  If you have access to your php.ini file you can change the first to 0, and the second to 1. 

 

If you don't have access to the php.ini but your host allows you to use htaccess, you could create an .htaccess file with the following:

 

  php_value session.use_trans_sid                0

  php_value session.use_only_cookies                1

Link to comment
Share on other sites

You'd just need to put that into your root html directory and you should be good.  It shouldn't affect your site at all as it just tells php how to track session ids, basically making sure to track them via cookie and not in the URL.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.