Create Php page that redirects to another page transmitting some content?

It sounds like you're looking for an AJAX post. This might sound like an advanced topic for a beginner, but if you check out a framework like jQuery (api.jquery.com/jQuery.post/) you'll see it's quite simple Try something like this: $('#myform'). Submit(function() { var url = 'databasequery.

Php'; var postcode = $('#postcode').val(); $. Post( url, { postcode: postcode }, function( data ) { $( "#result" ).empty(). Append( data ); } ); return false; }) In your HTML you would tag your form as myform and create an empty div with the id "result Your 'databasequery.

Php' file should accept a POST variable called postcode and simply output the response you want to display on your page.

It sounds like you're looking for an AJAX post. This might sound like an advanced topic for a beginner, but if you check out a framework like jQuery (api.jquery.com/jQuery.post/) you'll see it's quite simple. Try something like this: $('#myform').

Submit(function() { var url = 'databasequery. Php'; var postcode = $('#postcode').val(); $. Post( url, { postcode: postcode }, function( data ) { $( "#result" ).empty().

Append( data ); } ); return false; }); In your HTML you would tag your form as myform and create an empty div with the id "result". Your 'databasequery. Php' file should accept a POST variable called postcode and simply output the response you want to display on your page.

It works great, thanks a lot! – Bruno Aug 8 at 9:38.

You can pass city name in query parameter like headers('Location: serachdatabase. Php? City='.

$cityname); But that may not be what you are looking for. You can consider using Ajax to do this. Using Ajax the page will not refresh completely but only the portion of page can be refreshed.

Ajax, if you don't know about it, is widely used.

You can redirect using header("Location:..."); or you could simply just post a form Postal code and then do in php something like this: Note that this code isn't "safe" to put it in a mysql query!

And will mean a page reload with visible redirection to user. – Kumar Aug 8 at 8:14.

If you don't want any page redirect, you'll need to use either an iFrame or some CSS-id'd divs to load your content into using javascript's XMLHttpRequest or jQuery's axaj or similar to load info from another PHP page and insert it inside the current document. Here is an example use of XmlHttpRequest, and Here is jQuery's API documentation on its ajax method.

The key to your problem's solution are GET and POST parameters. Learn about HTML forms.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions