hi all,
i have a form contain a lot of selectbox. Some of the selectbox need to do setup. when i press the button beside selectbox, it will popup a page which is setup that data. After keyin data and closed, the mainpage will get the data just keyin.
i quite difficult to describe it since my english also not very well, hope you understand.
any people done it before ? any reference ?
thanks for reply
a popup page add record then affect mainpage
Moderator: General Moderators
If I understood correct...
There are various of ways. One way might be something like this:
Pressing the button, sends the user to newpage.php, with the $_GET['test'] value in the URI.
( Example: http://www.example.com/newpage.php?test=4 )
Just ideas and examples.
There are various of ways. One way might be something like this:
Code: Select all
<form action="newpage.php" method="get">
<select name="test">
<?php
for ($i = 1; $i < 20; $i++) {
echo '<option value="'.$i.'">'.$i.'</option>';
}
?>
</select>
<input type="submit" />
</form>( Example: http://www.example.com/newpage.php?test=4 )
Code: Select all
<pre>
<?php
// example display. Do whatever here with .
if (!empty($_GET)) {
print_r($_GET);
}
// After done, forward again using header, example:
// header("Location: ./index.php?value=".$_GET['test']);
// ...or...
// header("Location: ./index.php");
?>
</pre>thanks reply
i describe again. i got a mainpage which is contain many selectbox. when i need to add new data for one of the selectbox, i press a button then will popup a new window.
So i can add data at that new window. After saved and close the new window, the mainpage will refresh to get new data. Something like phpmyadmin when edit the sql statement.
anyway thank u so much
i describe again. i got a mainpage which is contain many selectbox. when i need to add new data for one of the selectbox, i press a button then will popup a new window.
So i can add data at that new window. After saved and close the new window, the mainpage will refresh to get new data. Something like phpmyadmin when edit the sql statement.
anyway thank u so much
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK