Jump to content

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


ShaKeD

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 :)
Link to comment
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
Link to comment
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?
Link to comment
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....
Link to comment
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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.