If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Can this be done with just php? I was thinking that an anchor link would solve this but am not sure where to place that in the php code.

you don’t place it in the PHP code, you place it in the HTML code. and the HTML code responsible for the page to load after submit is in the form’s action attribute (which is btw. a required attribute).

The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.

you don’t place it in the PHP code, you place it in the HTML code. and the HTML code responsible for the page to load after submit is in the form’s action attribute (which is btw. a required attribute).

So to get the results of the php script at the center of the page I could add an anchor link to the form action like below?

<form action="mypage.php#anchor"> // page must be in the same directory

bear in mind that omitting the action attribute is invalid (though browsers tend to fix that for you).

The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.

You probably don't want to learn AJAX but some time later you may need it. Actually using 10 minutes you can master the JQuery Ajax method. It's a piece of cake. Check out to start with .get() or to do .post() . In JQuery AJAX, they do the same stuff. Or if you want to have more control of even the basic stuff, you can then use .ajaxhttp://www.jensbits.com/2009/10/04/j...ples-with-php/

Of course you can only use it if you have an understanding of fundamental JQuery stuff.