FORM problem + other questions - help!

liunx

Guest
I have a couple of problems, perhaps you could help me and post some helpful tips. Thanks<br />
<br />
<br />
Problem 1. I use a html Form tag, which I use to get data from user and writing them in a database (using php) in MySQL. My Form tag looks like this:<br />
<br />
<form action="poly_k.php" method=post><br />
<input type="text" name="polyvol" size="4" maxlength="4"><br />
<input type="submit" value=" Buy "><br />
</form> <br />
<br />
Everything up to this point works fine. File poly_k.php takes care of the writing into database actions.<br />
<br />
Now, I'd like to use data which I enter into the window <input...> use in 2 ways, depanding which button I press. In other words, I'd like to have a "Buy" submit button and "Sell" submit button and they would both use data from one input window. How do I do that?<br />
<br />
Is the following correct? (I suspect not...)<br />
<br />
<form action="poly_k.php" method=post><br />
<form action="poly_s.php" method=post><br />
<input type="text" name="polyvol" size="4" maxlength="4"><br />
<input type="submit" value=" Buy "><br />
<input type="submit" value=" Sell "><br />
</form><br />
<br />
How do I do that?<br />
<br />
<br />
Problem 2. I use frames. Now, 'd like to click a link in one of the frames and I'd like it to modify the contents of the other frame, whichout changing the current frame. How do I do that?<br />
<br />
<br />
Problem 3. I have a picture, which I use as a link (.jpg or .gif file). Now, I'd like this picture to have a couple of areas and depanding which area I click, I go to a different link (different URL). How do I do that? Do I have to use javascript for that?<br />
<br />
If you can help me and post, please do.<br />
<br />
Thanks,<br />
<br />
Jericho<!--content-->hi,<br />
<br />
<br />
i think that this question should be in the forum "PHP" as they are the ones that specialise in php, mysql and things like that.<!--content-->OK, I will post in PHP thread, but Form tag is a html tag.<br />
<br />
I'm really desperate and I can't figure it out. If someone has some friendly tips, please post and help. Thank you.<!--content-->#1: Guess I'll wait for your post in the PHP forums...<br />
<br />
#2: Depends on what you need. Can you use a regular link to change it? <a href=http://www.webdeveloper.com/forum/archive/index.php/"someurl.htm" target="framename">link</a>?<br />
<br />
#3: Read up on imagemaps: <!-- m --><a class="postlink" href="http://www.w3.org/TR/html4/struct/objects.html#h-13.6">http://www.w3.org/TR/html4/struct/objects.html#h-13.6</a><!-- m --><!--content-->pyro - Thanks a lot! These things are frustrating and I'm trying to learn. Your help means a lot!<br />
<br />
#2: Here is what I have. I have a main file and I have 3 frames on my page. There is a different file for each of the frame: fr01.php, fr02.php and fr03.php.<br />
<br />
Now I have a link in fr01.php. I'd like this link to run another php file (this is easy) and then to refresh fr02.php in the other frame. How can I do that?<br />
<br />
What I have now is when I click a link, it changes the contents of the current frame, not the other frame.<br />
<br />
This is my main file:<br />
<br />
<html><br />
<br />
<head><br />
<title>main01</title><br />
</head><br />
<br />
<frameset cols="21%,79%"><br />
<br />
<frame src=http://www.webdeveloper.com/forum/archive/index.php/"fr01.php"><br />
<br />
<frameset rows="14%,86%"><br />
<br />
<frame src=http://www.webdeveloper.com/forum/archive/index.php/"fr011.php"><br />
<frame src=http://www.webdeveloper.com/forum/archive/index.php/"fr02.php"><br />
<br />
</frameset><br />
<br />
</frameset><br />
<br />
</html><br />
<br />
-----------------<br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"someurl.html" target="framename">blah blah</a><br />
<br />
What do I use as target="framename"? Shall I use target="fr02.php"?<!--content-->No, you need to give each of your frames names, and then use that in the target.<!--content-->Is the following correct?<br />
<br />
<br />
<html> <br />
<br />
<head> <br />
<title>main01</title> <br />
</head> <br />
<br />
<frameset cols="21%,79%"> <br />
<br />
<frame name="fr1"src=http://www.webdeveloper.com/forum/archive/index.php/"fr01.php"> <br />
<br />
<frameset rows="14%,86%"> <br />
<br />
<frame name="fr2" src=http://www.webdeveloper.com/forum/archive/index.php/"fr011.php"> <br />
<frame name="fr3" src=http://www.webdeveloper.com/forum/archive/index.php/"fr02.php"> <br />
<br />
</frameset> <br />
<br />
</frameset> <br />
<br />
</html><!--content-->Yes, though in your first frame, put a space between name="fr1" and src=http://www.webdeveloper.com/forum/archive/index.php/"fr01.php"<!--content-->Thanks. This should work well, I will try that in a second.<!--content-->Works great! Thanks!<br />
<br />
But another thing... let's say that now I want a link from one of the frames to effect the entire page, not only a selected frame. How do I do that?<!--content-->Use target="_top".<!--content-->Thanks. Also target="_parent" seems to work fine.<!--content-->Yes, they are close to the same, but target="_top" will work for nested framesets, as well...<!--content-->
 
Back
Top