Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
PHP Text Box include?
Old 10-23-2007, 08:59 AM PHP Text Box include?
Ultra Talker

Posts: 298
Trades: 3
Hi

I have a form with one text input, and i need to take the users input and place it into another form, is this possible using php, if so how?

Thanks
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Tropica is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-23-2007, 10:50 AM Re: PHP Text Box include?
Experienced Talker

Posts: 34
Name: DesignersForHire
Location: India
Trades: 0
It can be done by adding hidden fileds in the second form.But it need posting data from one forum to another one
__________________
Joseph

Please login or register to view this content. Registration is FREE
michael_1980 is offline
Reply With Quote
View Public Profile Visit michael_1980's homepage!
 
Old 10-23-2007, 12:05 PM Re: PHP Text Box include?
Foundationflash's Avatar
Ultra Talker

Posts: 410
Name: Harry Burt
Location: Colchester, Essex, England
Trades: 0
If you can use the same page for both forms, then you can just use POST. Otherwise you may need to write to cookie, or session variables to store them long term.

Can you be more specific?
__________________
Foundation Flash tutorials :
Please login or register to view this content. Registration is FREE


New Dreamed Up Web Design:
Please login or register to view this content. Registration is FREE
Foundationflash is offline
Reply With Quote
View Public Profile Visit Foundationflash's homepage!
 
Old 10-23-2007, 12:22 PM Re: PHP Text Box include?
Ultra Talker

Posts: 298
Trades: 3
Yeah sorry

I have a whois form, and in the input the user would insert their domain name

Once the whois runs and the details show, at the bottom I want to add a more detailed statistic, that will open in a java window (alexa, pr etc..) and I need the domain name in place for that input so the user only needs to click the submit button
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Tropica is offline
Reply With Quote
View Public Profile
 
Old 10-23-2007, 12:33 PM Re: PHP Text Box include?
Foundationflash's Avatar
Ultra Talker

Posts: 410
Name: Harry Burt
Location: Colchester, Essex, England
Trades: 0
I think SESSION variables would best be suited for your purpose, so check 'em out as they say. When the (first) form is submitted assign the domain to a session variable then echo it back out later.
__________________
Foundation Flash tutorials :
Please login or register to view this content. Registration is FREE


New Dreamed Up Web Design:
Please login or register to view this content. Registration is FREE
Foundationflash is offline
Reply With Quote
View Public Profile Visit Foundationflash's homepage!
 
Old 10-23-2007, 12:48 PM Re: PHP Text Box include?
rion's Avatar
Experienced Talker

Posts: 31
Name: Rion
Location: Portland, Oregon
Trades: 0
Can you post a sample of your code here?

I think that would make it easier to help you out. To me, this sounds like an easy fix. If you want to use what was posted from the previous page more than once you just call the POST var again.

Something like this should work for what you want to do.
HTML Code:
<form name="form" id="form" action="action.php" method="post">
<input type="hidden" name="form_value_1" id="form_value_1" value="$<?=$_POST['form_field_value_from_previous_page'];?>">
<input type="submit" value="Detailed Information">
</form>
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
rion is offline
Reply With Quote
View Public Profile Visit rion's homepage!
 
Old 10-23-2007, 12:55 PM Re: PHP Text Box include?
Ultra Talker

Posts: 298
Trades: 3
my first form:
PHP Code:
<form name="form1" method="post" action="get.php">
<
input type="text" name="dom" value="" style="font-size: 30px;" />
<
input type="image" src="img/go.jpg">
</
form
The second form:

PHP Code:
<form method="post" action="./" onsubmit="getResults(this.url.value); return false;">
            <input type="text" name="url" value="<?php echo ($_GET['url']) ? htmlspecialchars($_GET['url']) : 'http://www.google.com/'?>" size="40" />
            <input type="submit" value="Submit" />
        </form>
I need the input that is entered from the first form to appear in place of the http://www.google.com/ place in the second.

Thanks
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Tropica is offline
Reply With Quote
View Public Profile
 
Old 10-23-2007, 01:29 PM Re: PHP Text Box include?
rion's Avatar
Experienced Talker

Posts: 31
Name: Rion
Location: Portland, Oregon
Trades: 0
Quote:
Originally Posted by Tropica View Post
my first form:
PHP Code:
<form name="form1" method="post" action="get.php">
<
input type="text" name="dom" value="" style="font-size: 30px;" />
<
input type="image" src="img/go.jpg">
</
form
The second form:

PHP Code:
<form method="post" action="./" onsubmit="getResults(this.url.value); return false;">
            <input type="text" name="url" value="<?php echo ($_GET['url']) ? htmlspecialchars($_GET['url']) : 'http://www.google.com/'?>" size="40" />
            <input type="submit" value="Submit" />
        </form>
I need the input that is entered from the first form to appear in place of the http://www.google.com/ place in the second.

Thanks
For the second form :
HTML Code:
<form method="post" action="./" onsubmit="getResults(this.url.value); return false;">
            <input type="text" name="url" value="<?php echo ($_GET['url']) ? htmlspecialchars($_GET['url']) : htmlspecialchars($_POST['dom']); ?>" size="40" />
            <input type="submit" value="Submit" />
        </form>
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
rion is offline
Reply With Quote
View Public Profile Visit rion's homepage!
 
Old 10-23-2007, 02:39 PM Re: PHP Text Box include?
Ultra Talker

Posts: 298
Trades: 3
perfect! thanks rion!

Repped
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Tropica is offline
Reply With Quote
View Public Profile
 
Old 10-23-2007, 04:28 PM Re: PHP Text Box include?
rion's Avatar
Experienced Talker

Posts: 31
Name: Rion
Location: Portland, Oregon
Trades: 0
Anytime!
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
rion is offline
Reply With Quote
View Public Profile Visit rion's homepage!
 
Reply     « Reply to PHP Text Box include?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.64858 seconds with 12 queries