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
https://forums.phpfreaks.com/topic/58296-solved-url-acting-crazy/
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

Archived

This topic is now archived and is closed to further replies.

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