Re: [PHP] Problems with a simple page

2003-11-25 Thread Graham Solomon
Jay Blanchard wrote:
[snip]
Hi php-fans... here's a simple question for you
I have this HTML page in WIN (Busqueda.htm)
the page contains a textfield (textfield3)
and a button (submit1)
which calls a php file Buscador.php in a Linux server  (RED HAT 8)
well, my php file which doesn't read 
anything when I write this

echo ($textfield3)

why can it be?...they seem to be "disconnected" 
but the php file works because I access a MySql table 
since it.. with no problems... 
[/snip]

Try 

echo $_POST['textfield3'];
That should work, reason being your server probably has register globals 
turned off.

G.Solomon

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: 2 (simple?) php related questions

2003-11-27 Thread Graham Solomon
Ryan A wrote:

Hi,
I have 2 main php questions and a few sub questions :-)
1.
 I have Dreamweaver/EditPlus and Zend developer (some full versions some
trial) (am open to trying out other tools)
Is there anyway to do a find/replace on a particular variable in a whole
directory? (or all files that refer/use that variable)
eg:
find $GuessableVariable and replace it with $HardToGuessVariable
or do i have to go file by file and do a search?

2.
I have visited many sites which use ASP/JSP and PHP which instead of calling
*differient* pages like so:
http://somesite.com/pageName.php?s=blah
http://somesite.com/DifferientPageName.php?s=blah2
(thats the way i generally program)

keep calling the *same* page with numbers, like so:
http://somesite.com/pageName.php?s=333
then
http://somesite.com/pageName.php?s=334
http://somesite.com/pageName.php?s=253
etc
Whats the advantage of the above and whats the idea?
isnt it much easier (and logical) to keep track of pages if you give them a
logical name?
giving a page: loginClient.php is much easier than remembering
script.php?val=214
right?
Or am I missing something?
Thanks,
-Ryan
http://Bestwebhosters.com
Hi ryan,

I have a search replace tool which i'll send to you, you can add all php 
files to it and do a search replace on all of them at once, very simple.

and as for the 2nd question when I build sites I use the 
index.php?page=contact etc type method, the point is to have one file 
with your navigation/header/footer in so you can make one change to 
these common parts for all pages.

e.g.

index.php?page=contact

would be as follows

*
//header
//navigation
switch(page) {
case contact:   include("contact.php"); break;
}
//footer
*
whereas when you call a different file for each page it is more like this...

*
include("header.php");
// code & content here

include("footer.php");
*
or at least thats how I do it : )

Regards
  G.Solomon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php