Jump to content

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

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.