Connecting Tech Pros Worldwide Help | Site Map

relative linking in php

 
LinkBack Thread Tools Search this Thread
  #1  
Old March 12th, 2008, 11:55 PM
Sudhakar
Guest
 
Posts: n/a
Default relative linking in php


i am using a self submitting for using php
<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="POST"
id="test2" name="registrationform">

the registration page starts with a lot of terms and other details
about the registration and then the form fields for the

user to fill the registration page. i have used php to validate the
form, presently when a user clicks the submit button and

if there are any validateions that need to be displayed to the user,
then the user has to scroll from the top of the page all

the way till they see the form elements with the validation message
ex= Please enter your phone number.

my question is, as in html with relative linking ex
<a href="#link1"click here</a>

<a name="link1"</a>
Text here

the page can be moved to an exact location, can this be done more or
less close to this relative linking using php so that

the user need not scroll from the top of the page to see the
validation message.

NOTE = since i am using a self submitting form just before the first
form element i have created a blank table row and in

this table row the php validation message would appear if the user
missed out some information. due to this the user has to

scroll from the top of the page to see the php generated validation
message. if i use the same php validation at the very top

of the page the error message will be at the top and the form fields
at the bottom and the user will have to scroll up and

down to read the validation message.

please advice.

thanks.

  #2  
Old March 13th, 2008, 12:55 AM
ZeldorBlat
Guest
 
Posts: n/a
Default Re: relative linking in php

On Mar 12, 7:54 pm, Sudhakar <sudhakarar...@gmail.comwrote:
Quote:
i am using a self submitting for using php
<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="POST"
id="test2" name="registrationform">
>
the registration page starts with a lot of terms and other details
about the registration and then the form fields for the
>
user to fill the registration page. i have used php to validate the
form, presently when a user clicks the submit button and
>
if there are any validateions that need to be displayed to the user,
then the user has to scroll from the top of the page all
>
the way till they see the form elements with the validation message
ex= Please enter your phone number.
>
my question is, as in html with relative linking ex
<a href="#link1"click here</a>
>
<a name="link1"</a>
Text here
>
the page can be moved to an exact location, can this be done more or
less close to this relative linking using php so that
>
the user need not scroll from the top of the page to see the
validation message.
>
NOTE = since i am using a self submitting form just before the first
form element i have created a blank table row and in
>
this table row the php validation message would appear if the user
missed out some information. due to this the user has to
>
scroll from the top of the page to see the php generated validation
message. if i use the same php validation at the very top
>
of the page the error message will be at the top and the form fields
at the bottom and the user will have to scroll up and
>
down to read the validation message.
>
please advice.
>
thanks.
Just include the anchor in the URL that the form is posting to:

<form action="<?php echo $_SERVER["PHP_SELF"]; ?>#topOfForm"
method="POST" id="test2" name="registrationform">
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.