Jump to content


Photo

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


  • Please log in to reply
10 replies to this topic

#1 ShaKeD

ShaKeD
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 04 July 2006 - 11:04 PM

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

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 04 July 2006 - 11:09 PM

can you be a little clearer?

#3 ShaKeD

ShaKeD
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 04 July 2006 - 11:13 PM

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

#4 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 04 July 2006 - 11:15 PM

Sorry... maybe English isn't your first language?

I think you might be looking for the curl extension.

#5 ShaKeD

ShaKeD
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 04 July 2006 - 11:19 PM

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?


#6 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 04 July 2006 - 11:32 PM

now its more clear?

Not really. Do you meen?

p1.php
echo "<form action='p2.php' method='post'>";
echo "  <input type='text' name='name'>";
echo "  <input type='submit'>";
echo "</form>";
p2.php
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>";
}
Im still a little lost....

#7 ShaKeD

ShaKeD
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 04 July 2006 - 11:38 PM

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

#8 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 04 July 2006 - 11:50 PM

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.

#9 ShaKeD

ShaKeD
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 04 July 2006 - 11:51 PM

but how can I try do it ?


#10 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 04 July 2006 - 11:59 PM

Just point the forms action to the script to process it.

#11 ShaKeD

ShaKeD
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 05 July 2006 - 03:47 PM

how can I point <input textbox> without control this page...





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users