url containing url...

i have a little doubt about passing value from html to php page…the traditional way says put everything in form and submit it…like
in form1.php

in go.php file

echo $_get[‘text1’];
and in another file use $_GET[’’] to retrieve this value but the problem is whole page reloads…
here is what i want to do…
i want to use anchor tag instead of submit and pass it to the another page…so that whole page wont reloads…
the codes are like that but i stuck in the url part

submit //i got stuk in this line ..how to do it...
i want to use anchor tag instead of submit and pass it to the another page...so that whole page wont reloads... the codes are like that but i stuck in the url part
If you want to submit some values to another page (script?) without redirecting user to that another page, you can use Ajax technique. Try jQuery, the [url=http://api.jquery.com/jQuery.get/].get()[/url] method, or .ajax() method.

@phphelp: actually im newbie and dont know anything abt jquery and ajax…can you tell me how to apply it…

Well, if you download jQuery, there is a demos directory with some good examples.

And here is the code what you can use for your task:
[php]<!doctype html>

Enter your text:
Submit [/php]

Code for file go.php:
[php]<?php
echo 'Data received: '.$_GET[‘text’];
?>[/php]

@phphelp thx for helping me out

@phphelp:can you tell me how to transfer 2 variables in your example… i google it but dint work

here is the link for my post
http://www.phphelp.com/forum/index.php/topic,12581.msg41752.html#msg41752

Sponsor our Newsletter | Privacy Policy | Terms of Service