Hi,

First up, I am a little lost with events.

I am trying to do this and I can almost say that its not doable:

"one.php"

<?php
echo '<input type="text" maxlength="5" name="bill" value="" /><br />';

$get_pass = 5;
$get_pass1 = 10;
?>

<a href="two.php?getpass=<? echo $get_pass ?>&getpass1=<? echo $get_pass1 ?>">test me</a>
"two.php"

<?php

$one=$_GET['getpass'];
$two=$_GET['getpass1'];

echo $one;
echo $two;

?>

The above works. I want to get at the data inside the text element. Is there anyway to do this or do I have to use forms to fire an event?

Thank you for answering.

sb

Member Avatar for diafol
<?php echo $get_pass; ?>&getpass1=<?php echo $get_pass1; ?>

avoid short tags

Without a form, you don't submit the input field value back to the server, so PHP cannot access the value.

You could therefore: a) wrap it in a form and post to two.php, b) use JavaScript to get extract the value.

Option A is the more reliable.

R.

commented: clarified without a doubt +1

@blocblue,

Thank you for clarifying that. Appreciate your help.

I changed the whole thing to a form and now I have to code back some more stuff to make sure that it works well. Thanks again.

sb

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.