ShaKeD Posted July 4, 2006 Share Posted July 4, 2006 How to enter a value to <input> without writing in it ? like I mean I`v <input textbox in page 1.php and now I want to enter the word "what" from 2.php I tryied to do this : if ($_POST['B1'] = Submit) { $_GET['myfor] = "what";}<input B1 is on 2.php !thanks :) Quote Link to comment https://forums.phpfreaks.com/topic/13678-how-to-enter-a-value-to-without-writing-in-it/ Share on other sites More sharing options...
trq Posted July 4, 2006 Share Posted July 4, 2006 can you be a little clearer? Quote Link to comment https://forums.phpfreaks.com/topic/13678-how-to-enter-a-value-to-without-writing-in-it/#findComment-53065 Share on other sites More sharing options...
ShaKeD Posted July 4, 2006 Author Share Posted July 4, 2006 OK I will give you an example: I want to enter my password to my email throw my website, what does it mean? I`v gmail account, now I want to connect throw my page.php so I used <iframe> for the gmail.com pageand now I added a button on page.php, this button gives me my details (user\pass) when I click on it. BUT I want that this button will enter automaticly my details (user\pass) to the inputs so I will connect faster and I'll be able to add checkbox that will connect me automaticly to my gmail. this is an example, I know that I don't need it and I`v checkbox on gmail. thanks Quote Link to comment https://forums.phpfreaks.com/topic/13678-how-to-enter-a-value-to-without-writing-in-it/#findComment-53067 Share on other sites More sharing options...
trq Posted July 4, 2006 Share Posted July 4, 2006 Sorry... maybe English isn't your first language?I think you might be looking for the [url=http://php.net/curl]curl[/url] extension. Quote Link to comment https://forums.phpfreaks.com/topic/13678-how-to-enter-a-value-to-without-writing-in-it/#findComment-53069 Share on other sites More sharing options...
ShaKeD Posted July 4, 2006 Author Share Posted July 4, 2006 yeah it isn't.. I just want to use <input "textbox"> from another page like if you have page.php:<html><head></head><body><iframe src="www.gmail.com"><form method="POST" action="#"> <p dir="ltr"><input type="submit" value="Submit" name="B1"></form><?php if ($_POST['B1'] = Submit) { ['UserName'] = "MYUSERNAME"; -> textbox of the username will get the value "MYUSERNAME" ['Password'] = "PASSWORD"; -> textbox of the password will get the value "PASSWORD"}?>now its more clear? Quote Link to comment https://forums.phpfreaks.com/topic/13678-how-to-enter-a-value-to-without-writing-in-it/#findComment-53071 Share on other sites More sharing options...
trq Posted July 4, 2006 Share Posted July 4, 2006 [quote]now its more clear?[/quote]Not really. Do you meen?p1.php[code=php:0]echo "<form action='p2.php' method='post'>";echo " <input type='text' name='name'>";echo " <input type='submit'>";echo "</form>";[/code]p2.php[code=php:0]if (isset($_POST['submit'])) { echo "<form action='p3.php' method='post'>"; echo " <input type='text' name='name' value='{$_POST['name']}'>"; echo " <input type='submit'>"; echo "</form>";}[/code]Im still a little lost.... Quote Link to comment https://forums.phpfreaks.com/topic/13678-how-to-enter-a-value-to-without-writing-in-it/#findComment-53077 Share on other sites More sharing options...
ShaKeD Posted July 4, 2006 Author Share Posted July 4, 2006 I will write it again! the problem is like that.. In the internet someone enter the page "1.php" this page gives you to connect and see your profile in the website, BUT this webmaster forgot to add checkbox for "remember my password" and he didn't use cookies. So I wanted to add it myself, how? I want to use IFRAME to this page "1.php" to my page (we can call my page "2.php" for the example). Now in "2.php" I will put a submit button that when I will click on him it will automaticly write my details in the iframe of "1.php" means that if I click on submit it will write in the username textbox username that I wrote in the code when I click submit. I will continue alone from here, but how can I do it? [short words]I just want to use this button to enter value to editbox on another page of someother(not mine) websitehope you will understand me Quote Link to comment https://forums.phpfreaks.com/topic/13678-how-to-enter-a-value-to-without-writing-in-it/#findComment-53083 Share on other sites More sharing options...
trq Posted July 4, 2006 Share Posted July 4, 2006 You can point any form you like to any page you like but if the script on the other end isn't expecting what you send it your only going to get errors. Quote Link to comment https://forums.phpfreaks.com/topic/13678-how-to-enter-a-value-to-without-writing-in-it/#findComment-53085 Share on other sites More sharing options...
ShaKeD Posted July 4, 2006 Author Share Posted July 4, 2006 but how can I try do it ? Quote Link to comment https://forums.phpfreaks.com/topic/13678-how-to-enter-a-value-to-without-writing-in-it/#findComment-53087 Share on other sites More sharing options...
trq Posted July 4, 2006 Share Posted July 4, 2006 Just point the forms action to the script to process it. Quote Link to comment https://forums.phpfreaks.com/topic/13678-how-to-enter-a-value-to-without-writing-in-it/#findComment-53093 Share on other sites More sharing options...
ShaKeD Posted July 5, 2006 Author Share Posted July 5, 2006 how can I point <input textbox> without control this page... Quote Link to comment https://forums.phpfreaks.com/topic/13678-how-to-enter-a-value-to-without-writing-in-it/#findComment-53390 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.