Jump to content

Archived

This topic is now archived and is closed to further replies.

ShaKeD

How to enter a value to <input> without writing in it ?

Recommended Posts

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 :)

Share this post


Link to post
Share on other sites
can you be a little clearer?

Share this post


Link to post
Share on other sites
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 page
and 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

Share this post


Link to post
Share on other sites
Sorry... maybe English isn't your first language?

I think you might be looking for the [url=http://php.net/curl]curl[/url] extension.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
[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....

Share this post


Link to post
Share on other sites
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) website

hope you will understand me

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Just point the forms action to the script to process it.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.