Unstoppable Domains

Web forms - Please help me

Spaceship Spaceship
Watch

noswad

Established Member
Impact
1
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.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
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:
header ("Location: http://www.amazon.com=".$number);

If you can't use PHP (dunno why not though), I'm not sure how to do it through just HTML. In fact, I don't think it's possible...
 
0
•••
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. :P
 
Last edited:
0
•••
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% :-/
 
0
•••
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.
 
0
•••
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:
<?php

//Replace the value in [' '] to be the name of the textbox you declared in the form file. 
$number = $_POST['number'];

//Empty?
if ($number < 1)
{
    echo 'You have to type a number!';
    exit;
}
//Not a number?
if (!is_numeric($number))
{
   echo 'You must type a NUMBER.';
   exit;
}

//Put some code here to verify if you need the number to be between a certain amount.
//If you don't want decimals, you may want to check for those too.

//Redirect the user now.
header ('Location: http://amazon.com?id='.$number);

//Done!
?>

Not exactly sure if "is_numeric" has the underscore, but I think it does. Tell me if it works.
 
0
•••
noswad said:
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.

Yea, Hold on:

Code:
<form name="input" action="http://www.amazon.com" method="get">
<input type="text" name="id">
<input type="submit" value="Submit">
</form>

Simple as that ;) (Reputation would be nice :P)

:)
 
0
•••
... or you could do that <_<...
 
0
•••
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back