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
https://forums.phpfreaks.com/topic/33628-using-include-with-anchor-tag/
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
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?

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.