Jump to content

Using include with anchor tag


bmopro

Recommended Posts

Here is what i am trying to do...

[code]
<?php
if(isset($_POST0['edit_address'])){

include 'user_info.php#address';
exit():
}
?>
[/code]

I want to use drop down menus to keep it clean, and so when people go to
edit their account, there isn't a ton of links.
When i hit the edit input button i get the error that the page does not exist.
How can i use anchor tags in this way?
Thanks for the Help!
Brian
Link to comment
Share on other sites

taith thank for the reply!
How would i do it with a header?
Is there a way to send a session variable, so when the page is included
in the header of that page it would jump to a point in that page depending on that session variable.
Hope that makes sense!
Thanks
Brian
Link to comment
Share on other sites

do yourself a favor... use this... saves SOOO much time ;-)
[code]
<?
function redirect($filename=".?op=main",$delay="0",$die="0"){
if((!headers_sent())&&($delay=="0")) header('Location: '.$filename);
elseif($delay=="0"){
  echo '<script type="text/javascript">';
  echo 'window.location.href="'.$filename.'";';
  echo '</script>';
  echo '<noscript>';
  echo '<meta http-equiv="refresh" content="0;url='.$filename.'" />';
  echo '<noscript>';
}else echo '<meta http-equiv="refresh" content="'.$delay.';url='.$filename.'" />';
if($die=="0") exit;
}
?>
[/code]

[code]
if(!empty($_SESSION[edit])) redirect("yourpage.php?op=$_SESSION[edit]#youranchor");
[/code]
like that?
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.