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.

HTML Forum


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



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 08-31-2009, 12:40 AM How can I do this?
Novice Talker

Posts: 6
Name: Upendra Duwadi
Trades: 0
Hello Everybody,
I am new in html and css.
I have designed a site where I am an enquiry form. Here is the enquiry form page. http://www.ambitionhimalaya.com/enqu...p_enquiry.html
My problem is I want to add a value in "Name of the Trip" page automatically when someone clicks in send us enquiry from another page. I mean if someone is viewing this page http://www.ambitionhimalaya.com/trek..._trekking.html there is one link "Find out more about this Trip / Give us an Enquiry" and when someone clicks in this link, I want to get value automatically in "Name of the Trip Page" Would anybody help that how can I do this?
You can find this kind of example here: http://www.adventurehikenepal.com/ne...p_trekking.php

on this link, if you click on "Enquiry" on the bottom then it automatically comes with "Everest Base Camp Trekking" on "Interested Program" value.

I would really appreciate if somebody help me.
Thank you so much in advance.

With best regards,
Upendra
upendraduwadi is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-31-2009, 04:21 AM Re: How can I do this?
Bertjeuh's Avatar
Average Talker

Posts: 25
Name: Bert Van Leemput
Trades: 0
Actually you need php to do that.

You can made a hidden form on your page.
HTML Code:
<form action="trip_enquiry.php" method="post">
<input type="hidden" name="tripname">
<input type="submit" value="Find out more about this trip">
</form>
The php page: trip_enquiry.php
PHP Code:
<?php
$tripname 
$_POST['tripname'];
?>
And then you can add your tripname into your form
PHP Code:
<input type="text" value="<?php echo $tripname?>" name="tripname">
__________________
There Are Only 10 Types of People in the World: Those Who Understand Binary, and Those Who Don't.
Bertjeuh is offline
Reply With Quote
View Public Profile
 
Old 08-31-2009, 05:51 AM Re: How can I do this?
Novice Talker

Posts: 6
Name: Upendra Duwadi
Trades: 0
Bertjeuh ,

Thank you so much for your reply. I really appreciate it.
When I tried to work with your code, it did not work. Would you please make a small page, small enquiry form with 2/3 values? I would really appreciate that.
I would not ask you but I tried to work as you told but I did not understand your things cause I m new one.
Thank you so much again.
upendraduwadi is offline
Reply With Quote
View Public Profile
 
Old 08-31-2009, 09:17 AM Re: How can I do this?
Bertjeuh's Avatar
Average Talker

Posts: 25
Name: Bert Van Leemput
Trades: 0
You're server supports php?
__________________
There Are Only 10 Types of People in the World: Those Who Understand Binary, and Those Who Don't.
Bertjeuh is offline
Reply With Quote
View Public Profile
 
Old 08-31-2009, 09:27 AM Re: How can I do this?
Bertjeuh's Avatar
Average Talker

Posts: 25
Name: Bert Van Leemput
Trades: 0
Copy this and name the page trip.html:

HTML Code:
<html>
<head>
<title>trip.html</title>
</head>
<body>
<form action="trip_enquiry.php" method="post">
<input type="hidden" name="tripname" value="TRIP001">
<input type="submit" value="Find out more about TRIP001">
</form>
<form action="trip_enquiry.php" method="post">
<input type="hidden" name="tripname" value="TRIP002">
<input type="submit" value="Find out more about TRIP002">
</form>
<form action="trip_enquiry.php" method="post">
<input type="hidden" name="tripname" value="TRIP003">
<input type="submit" value="Find out more about TRIP003">
</form>
<form action="trip_enquiry.php" method="post">
<input type="hidden" name="tripname" value="TRIP004">
<input type="submit" value="Find out more about TRIP004">
</form>
</body>
</html>
Then copy this and name the page trip_enquiry.php:
PHP Code:
<?php
$tripname 
$_POST['tripname'];
?> 
<html>
<head>
<title>trip_enquiry.php</title>
</head>
<body>
Name: <input type="text" name="name" /><br />
Country: <input type="text" name="country" /><br />
Trip: <input type="text" value="<?php echo $tripname?>" name="tripname">
</body>
</html>
upload it to your server and go to www.yourwebdomain.com/trip.html and click on the buttons

Here is an example www.bertvanleemput.be/trip.html
__________________
There Are Only 10 Types of People in the World: Those Who Understand Binary, and Those Who Don't.
Bertjeuh is offline
Reply With Quote
View Public Profile
 
Old 08-31-2009, 02:48 PM Re: How can I do this?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Clearly the OP has no idea what PHP is, so giving him code isn't all that helpful if he has no understanding of it.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

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


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

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-31-2009, 04:49 PM Re: How can I do this?
Bertjeuh's Avatar
Average Talker

Posts: 25
Name: Bert Van Leemput
Trades: 0
Quote:
Originally Posted by LadynRed View Post
Clearly the OP has no idea what PHP is, so giving him code isn't all that helpful if he has no understanding of it.
The code is for testing if his server supports php, and if he totally doesn't know what php is then its nog easy to make an interactive website.
__________________
There Are Only 10 Types of People in the World: Those Who Understand Binary, and Those Who Don't.
Bertjeuh is offline
Reply With Quote
View Public Profile
 
Old 08-31-2009, 11:44 PM Re: How can I do this?
Novice Talker

Posts: 6
Name: Upendra Duwadi
Trades: 0
Friends,
Thank you so much for your code. I am not fool in PHP but I have basic knowledge of it. I was just wondering about the code. My server supports PHP.
I got the code now.
Thank you so much Bertjeuh.
Regards,
Upendra
upendraduwadi is offline
Reply With Quote
View Public Profile
 
Old 09-01-2009, 02:47 AM Re: How can I do this?
Bertjeuh's Avatar
Average Talker

Posts: 25
Name: Bert Van Leemput
Trades: 0
You're welcome.
__________________
There Are Only 10 Types of People in the World: Those Who Understand Binary, and Those Who Don't.
Bertjeuh is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How can I do this?
 

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.37144 seconds with 12 queries