lioslios Posted January 15, 2012 Share Posted January 15, 2012 guys i have a submit button that if(isset($_POST['sub_diplo'])) { $_SESSION['tmp']=$_SESSION['tmp']." counts "; } but tthe button is at the end of the page so when i press the button the page reloads and gose to start! exept that my code working! so is any way to move page to first location?? thanks Link to comment https://forums.phpfreaks.com/topic/255087-move-to-page-position/ Share on other sites More sharing options...
blacknight Posted January 15, 2012 Share Posted January 15, 2012 use the # http var like #start in a link then <a name="start"></a> will move the page to this location Link to comment https://forums.phpfreaks.com/topic/255087-move-to-page-position/#findComment-1307953 Share on other sites More sharing options...
lioslios Posted January 15, 2012 Author Share Posted January 15, 2012 thanks i have make this if(isset($_POST['sub_diplo'])) { $_SESSION['tmp']=$_SESSION['tmp']." counts "; echo "<a name=\"jump\"></a>"; } and near button i have place the <A NAME="jump"> this works but is a correct way to do this? Link to comment https://forums.phpfreaks.com/topic/255087-move-to-page-position/#findComment-1307955 Share on other sites More sharing options...
blacknight Posted January 15, 2012 Share Posted January 15, 2012 add #jump to your action setting in the form tag at the start this will go direct to the name tag Link to comment https://forums.phpfreaks.com/topic/255087-move-to-page-position/#findComment-1307998 Share on other sites More sharing options...
lioslios Posted January 16, 2012 Author Share Posted January 16, 2012 ye si have try this <form method="post" action="mypage.php#jump"> and works but i have one form tag for 12 byttons so i need more then one jump places, i have start to use one form tag for each button now!, if you have some other idea tellme, thanks anyway! Link to comment https://forums.phpfreaks.com/topic/255087-move-to-page-position/#findComment-1308002 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.