SpiderPhp

Just another WordPress weblog

Posts Tagged ‘Button’

Question X on my form is a radio group that has 3 possible choices. If the customer picks option 2, I need to have a drop-down box appear that has 3 options. How do I accomplish this? I would like the drop-down box to be hidden until the customer selects option 2.

Alarm Codes


Alarm Codes

Alarm Code:
Alarm Description:

<?php
// Otherwise we connect to our Database
//include('db_login.php');
$connection = mysql_connect("localhost", "alarm", "") or die (mysql_error());
mysql_select_db (alarm_codes);
$find = $_POST['alarm'];
echo $_POST['searching'];
//This is only displayed if they have submitted the form
if ($_POST['searching']=="")
//If they did not enter an alarm we give them an error
if ($find == ""){
echo "

You forgot to enter an alarm code

” ;
exit;
}
// We preform a bit of filtering
$find = strtoupper($find);
$find = strip_tags($find);
$find = trim ($find);
//Now we search for our search term, in the field the user specified
$sql = “select * from codes where codes like ‘%” . $find . “%’ “;
$data = mysql_query($sql);
echo (“Searched For:
” .$find . “\n” );
//And we display the results
while($result = mysql_fetch_array( $data)) {
echo ‘

Result:

‘.$result;
echo $result['codes'] . “

” . $result['description'] .”

” ;
}
//This counts the number or results – and if there wasnt any it gives them a little message explaining that
$anymatches=mysql_num_rows($data);
if ($anymatches==0)
echo “Sorry, but we can not find an entry to match your query. Please add this alarm

\n”;
//And we remind them what they searched for
“mysql_free_result”;
(“mysql_close”);
?>

i need the add button to add alarm codes to the database and modify button to modify alarm codes already in the database

I will retrieve/insert data to MySQL & would like to stay in the same page with the retrieved data.

How Do I Get The Radio Button For Sex To Go To A Database Using Php

Posted Friday, July 17th, 2009
Tags: , , ,
Posted in Uncategorized | 3 Comments »

When using php what value would I have to set the field for sex to so that it would push the data to the database. Also can yoyu give an example of the code.

The only way I know to run a php script is to put the name of the script in a

tag. Are there any other options?
I have a situation where I would like to start a php script without relying on the user to press a button. I tried putting php code in a .html file, but when I load the file from the server it doesn’t execute any php.
Thanks,
Houyhnhnm

Creating Dynamic Next And Previous Button With Php And Oracle?

Posted Thursday, July 2nd, 2009
Tags: , , , , , ,
Posted in Uncategorized | 1 Comment »

How do you create a next and previous button using php and oracle as your database? For example, I have 100 records and I only want to show 30 records at a time. I really have no clue on how to do it. I know it can be done using php and mysql but our project requires us to use oracle as database.