Jump to content

[SOLVED] PHPSESSID IN URLS


jakebur01

Recommended Posts

How can I remove the PHPSESSID's from my urls?

 

It's ok if they are there inside the admin area, but I need to check for a session on my home page and I don't need the search engines indexing the sessionid's.

 

Is there any way to use sessions on a page without using session_start(); ?

 

<?php 

session_start();//this is at the top of the page

?>

// here is the section where I need to check if they are logged in.

<?php 	  
			if (isset($_SESSION['valid_user']))
  {	  
  ?>
                <table width="188" border="0" cellspacing="3" cellpadding="3">
                  <tr>
                    <td bgcolor="#DFDABD"><div align="center"><a href="admin.php" class="style15">My Account</a> <span class="style15">|</span> <a href="logout.php" class="style15">Log Out</a></div></td>
                  </tr>
                </table>  
                <?php

}
else
{
//echo "navigation";
?>

  <div style="padding-right:13px; ">
    <form name="form1" method="post" action="admin.php">
      <div align="right">
        <table width="183" border="0" cellspacing="3" cellpadding="3">
          <tr>
            <td bgcolor="#DFDABD"><div align="center"><span class="style15">User:</span><span class="style7">
              <input type="text" name="textfield2">
              </span> <br />
                          <span class="style15">Pass:</span>
                          <input type="password" name="textfield3">
                          <br />
                          <input type="submit" name="Submit" value="Log In">
                          <br />
                        <a href="signup.php" class="style2">Not a member? Sign up </a> <a href="#"><img src="images/pint_1.jpg" alt=" " width="6" height="5" vspace="1" border="0" style="margin-right:7px "></a></div></td>
          </tr>
        </table>
        </div>
    </form>
    </div>

<?php
}

?>

Link to comment
https://forums.phpfreaks.com/topic/119391-solved-phpsessid-in-urls/
Share on other sites

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.