| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Aug 2005 Location: Leeds, UK
Posts: 263
![]() | Web forms - please help me Hello. Im new to web design and have a little problem .... I have described the problem here if you would please take a look. www.Offer-Zone.co.uk Thanks guys. Its driving me mad. I have tried and edited loads of forms with no luck. |
| |
| | #2 (permalink) |
| DNOA Member Join Date: May 2004
Posts: 5,040
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | What does the = sign do? O.o If you meant to pass a variable via the URL bar, then you need ?= instead. Be sure you set a form action. PHP can accomplish your needs easily ... just set the form action to be, say, "go.php", make sure that the number is > 0 (so you know they actually entered one) then put in that header() function BEFORE you send ANY data to the browser. As for opening in a new window then, um, not sure... maybe Javascrict can fulfil your needs, unless a form tag has a target attribute. PHP Code: |
| |
| | #3 (permalink) |
| Account Closed Join Date: Apr 2004 Location: ~root
Posts: 1,091
![]() ![]() ![]() ![]() ![]() ![]() ![]() | Ah, I remember modyfying a google PR tool to do something like that. Let's see if I can remember it, will edit. Ok so, I know how to do it, but it has to have a name, it can't just be: http://amazon.com=265123. It could be http://amazon.com/?ref=542134 or something like: http://amazon.com/?id=25634 Etc. So, yea.
Last edited by sergio965; 08-07-2005 at 07:04 PM.
|
| |
| | #4 (permalink) |
| NamePros Member Join Date: Jan 2005 Location: Texas USA
Posts: 71
![]() | Maybe your form tags are incorrect? basically, when a form is submitted, check if that field has been entered, check if its a number, then do as stated above, use the header function to redirect the user to the appropriate link as for not seeing the amazon.com link, you could use one entire frame thats 100% by 100% :-/
__________________ I wonder... |
| |
| | THREAD STARTER #5 (permalink) |
| NamePros Regular Join Date: Aug 2005 Location: Leeds, UK
Posts: 263
![]() | Hi sergio, http://amazon.com/?id=25634 is perfect. Is there any code you could possibly post for me please? Thanks for your help guys. |
| |
| | #6 (permalink) |
| DNOA Member Join Date: May 2004
Posts: 5,040
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Here... you won't have to show the amazon.com at all in the textbox. It's quite simple. Set your form action to "go.php" or whatever you name this PHP file, and method should be POST. Here's some code: go.php PHP Code: |
| |
| | #7 (permalink) | ||||
| Account Closed Join Date: Apr 2004 Location: ~root
Posts: 1,091
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Code: <form name="input" action="http://www.amazon.com" method="get"> <input type="text" name="id"> <input type="submit" value="Submit"> </form> (Reputation would be nice )????: NamePros.com http://www.namepros.com/showthread.php?t=113499 | ||||
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 7 Web Site Design Mistakes That Will Lose You Clients | vimkar | Webmaster Tutorials | 39 | 04-20-2006 09:42 AM |
| Chapter 23 Web Marketing Integration | WebForging | Webmaster Tutorials | 0 | 03-20-2005 09:00 PM |