PDA

View Full Version : PHP Script Question


sleepingdanny
10-16-2002, 10:08 AM
I Want To Write A PHP Script That Uses This Form >>>

<form method="GET" action="test.php">
<input type="text" name="name">

<input type="submit" value="Search">
</form>

When A User Write A Name Of An Item It Will Send Him To This Page >>>

http://www.mysite.com/itemname.php

Can Anyone Write A Script For Me... PLEASE ??

imported_Gryphon
10-16-2002, 12:41 PM
Your question is lacking a bunch of information that will help with what you want.

Also, I don't think anyone is going to write a script for you, they will help you solve problems, but not do all the work for you.

Uranium-235
10-16-2002, 01:22 PM
of course, we will, if we get paid for it :D

roninblade
10-16-2002, 10:43 PM
Originally posted by sleepingdanny
I Want To Write A PHP Script That Uses This Form >>>
Can Anyone Write A Script For Me... PLEASE ??

huh? :wtf: write a script for free? uh, right. :suspect:

Grizzly
10-17-2002, 10:37 AM
I *think* I might have a guess as to what he's talking about, but it makes no sense to me why you would want to do something like this. Nevertheless, here is an example "test.php" (or whatever script you want to address via the ACTION parameter of your FORM tag.


<?php
$mySite='http://www.mysite.com/';

if(!isset($HTTP_GET_VARS['name'])) header("Location: ".$mySite);
if(!strLen(trim($HTTP_GET_VARS['name']))) header("Location: ".$mySite);

$redirectPage=$HTTP_GET_VARS['name'].'php';
header("Location: ".$mySite.$redirectPage);
?>


This is a very very very simple script - and I really don't see the use in having something like this. Perhaps you can elaborate your intent for us?

sleepingdanny
10-17-2002, 11:02 AM
I'm Just Trying New Things, That's All And I'm A PHP Beginner...

Grizzly
10-17-2002, 11:24 AM
Thats cool.

On a totally unrelated note...
sleepingdanny - why do you capitalize all of your words?

Strike
10-17-2002, 12:21 PM
Originally posted by Grizzly
Thats cool.

On a totally unrelated note...
sleepingdanny - why do you capitalize all of your words?
see my theory in this thread (http://coderforums.net/showthread.php?s=&threadid=1238) (which you posted in .. after the post I'm talking about ...)

Grizzly
10-17-2002, 01:10 PM
Originally posted by Strike
see my theory in this thread (http://coderforums.net/showthread.php?s=&threadid=1238) (which you posted in .. after the post I'm talking about ...)

VB? *shudders*
Somehow I doubt that's the reason. Why a programming language should impact your written english is beyond me.

Strike
10-17-2002, 01:27 PM
Originally posted by Grizzly
VB? *shudders*
Somehow I doubt that's the reason. Why a programming language should impact your written english is beyond me.
But it's not his written English, it's his typed English, so it's really the tendency to do the whole "hit spacebar, hold shift" mannerism that translates, not the "this word deserves to be capitalized" thought process. And besides, VB has English-like syntax (in a really ugly way), so it's not that hard to believe.

Grizzly
10-17-2002, 06:18 PM
Still...to me that would require one of the following:

(A) In my lifetime, I've written more lines of VB code than I have english.
(B) When I first used a keyboard of any kind, I started coding VB, BEFORE I ever typed plain english.

I really can't imagine (A) or (B) being humanly possible. If you work in the IT field, you gotta type about 45,000 e-mails a day, and you simply CAN'T be Typing Like This All Of The Time. It Will Drive Your Clients Crazy And Make You Lose Your Job Faster Than You Can Say "Polly Want A Cracker"

Uranium-235
10-18-2002, 12:22 AM
VB/ASP makes my head hurt :sick: