Re: Re: Pass var from JavaScript to PHP
| From: | George Lioumis | Date: | Tue, 13 Nov 2001 12:54:20 +0000 |
| Subject: | Re: Re: Pass var from JavaScript to PHP | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-14277@lists.php.net to get a copy of this message | ||
I'll try it right away!!
Thanx a lot.----- Original Message -----
From: "TorrentUK" <torrent@TURNIPSQUATTER.ski-info-online.com>
To: <php-db@lists.php.net>
Sent: Tuesday, November 13, 2001 2:56 PM
Subject: [PHP-DB] Re: Pass var from JavaScript to PHP
> err...what javascript the form is HTML?
> Try...
>
> <form name="<NAME>" method="get OR post" action="<?php
> echo $PHP_SELF?>">
>
> Then in your page have a php tag that checks for the presence of $Find (in
> your case), e.g.
>
> if ($Find) {
> sql = (SELECT * FROM table WHERE $criteria = "value");
> then the rest...
> }
>
> -torrent
>
> "George Lioumis" <glioumis@adacom.com> wrote in message
> news:009401c16c3d$e529a0c0$05041fac@adacom.com...
> Good day to all!
>
> Consider the following code:
>
> <FORM ...>
> <INPUT type="Text" name="criteria" size="50">
> <BR>
> <INPUT type="Button" name="Find" value="Find">
> </FORM>
>
> I want to get the text that the user writes into the text field into a php
> variable to use it in the same page.
> I want to use this text as a criteria to search for an entry in my mySQL
DB
> using a LIKE statement in the select.
>
> Does anyone knows how to do it?
>
> Thanx inadvance.
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>