| | |
Field List Input Problem
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Jul 2009
Posts: 42
Reputation:
Solved Threads: 0
I am working of a musicians volunteer DB. I have a ADD Volunteer page:
Then I target a page that does the ADD:
I, also, have a EDIT Volunteer page:
Then I target a page that does the UPDATE:
Three issues I need help to resolve:
1) When I select more then one choice from my Instrument field, then select the ADD button, the multiple selections do not carry over to my mySQL table record. Only one value does. The field is a varchar type with plenty of characters allowed.
2) Once I get the data into my DB properly, I need to then be able to have it display properly when I retrieve it on my Update Volunteer Entry page.
3) Eventually, I will establish a Performance Date table in which I will assign Volunteers to performances. When I add a Volunteer:
IF they have multiple instruments they play, I would to provide the user a menu of choices for the field, based of the field Volunteer::Instrument
ELSE
Display it this way: Instrument - Piano
END IF
On a personal note, this is a online DB I am working on for the local Rescue Mission (Homeless Shelter Program). This is my first PHP/mySQL project, so I got much to learn. But once I see how things are done, I catch on pretty quickly.
If there is anyone who would like to volunteer their services to assist me in finishing this project for them, I could make sure you get a Letter of Donated Services from the the Non-Profit organization(tax right off). Just give me a PRIVATE message, if you are willing to help.
Thanks and I appreciate any help that can be offered.
PHP Syntax (Toggle Plain Text)
<?php require_once('auth.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Village Of Hope Worship</title> <style type="text/css"> <!-- .style1 { font-size: 24px; font-weight: bold; } .style3 { font-size: 12px; font-weight: bold; font-style: italic; } .style5 { font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #0000FF; } --> </style> </head> <body> <table width="505" border="0" align="center" cellpadding="2" cellspacing="2"> <tr align="center" valign="middle"> <td height="42" colspan="2"><div align="center" class="style1">New Volunteer Entry </div></td> </tr> <tr> <td width="348"><span class="style3"><a href="volunteers_list.php">Back to LIST</a> </span></td> <td width="143" align="center" valign="middle"><div align="center"> <form id="form1" name="form1" method="post" action="volunteers_list_add.php"> <input type="reset" name="Reset" value="Reset" /> <input name="Submit" type="submit" id="Submit" value="SAVE" /> </div></td> </tr> </table> <br /> <table width="504" border="0" align="center" cellpadding="2" cellspacing="2"> <tr> <td width="91"><div align="right"> <label>First Name: </label> </div></td> <td colspan="2"><input name="First_Name" type="text" id="First_Name" maxlength="25" /></td> </tr> <tr> <td><div align="right"> <label>Last Name:</label> </div></td> <td colspan="2"><input name="Last_Name" type="text" id="Last_Name" size="42" maxlength="35" /></td> </tr> <tr> <td><div align="right"> <label>Email:</label> </div></td> <td colspan="2"><input name="Email" type="text" id="Email" size="42" maxlength="60" /></td> </tr> <tr> <td><div align="right"> <label>Contact Phone:</label> </div></td> <td colspan="2"><input name="Contact_Phone" type="text" id="Contact_Phone" maxlength="20" /></td> </tr> <tr> <td><div align="right"> <label>Address:</label> </div></td> <td colspan="2"><input name="Address" type="text" id="Address" size="42" maxlength="60" /></td> </tr> <tr> <td><div align="right"> <label>City/St/Zip:</label> </div></td> <td colspan="2"><input name="City" type="text" id="City" maxlength="30" /> <input name="State" type="text" id="State" size="3" maxlength="2" /> <input name="Zip" type="text" id="Zip" size="12" maxlength="10" /></td> </tr> <tr> <td> <div align="right"> <label>Username:</label> </div></td> <td colspan="2"><input name="Username" type="text" id="Username" maxlength="20" /></td> </tr> <tr> <td><div align="right">Password:</div></td> <td colspan="2"><input name="Password" type="text" id="Password" maxlength="20" /></td> </tr> <tr> <td><div align="right">ADMIN:</div></td> <td colspan="2"><input name="ADMIN" type="text" id="ADMIN" maxlength="2" /></td> </tr> <tr> <td><div align="right">Instruments:</div></td> <td width="116" align="center" valign="middle"> <div align="left"> <select name="Instrument" size="5" multiple="multiple" id="Instrument"> <option>Select from the list below...</option> <option value="Leader">Leader</option> <option value="Singer">Singer</option> <option value="Piano">Piano</option> <option value="Synth">Synth</option> <option value="Acoustic Guitar">Acoustic Guitar</option> <option value="Electric Guitar">Electric Guitar</option> <option value="Bass Guitar">Bass Guitar</option> <option value="Drums">Drums</option> <option value="Percussion">Percussion</option> <option value="Sax/Horn">Sax/Horn</option> <option value="Flute">Flute</option> </select> </div></td> <td width="277" align="center" valign="middle"><div align="left"><span class="style5">To select multiple, hold down your <br /> Command Key (MAC) or ALT (PC)</span></div></td> </tr> <tr> <td><div align="right">Special Notes: </div></td> <td colspan="2"><textarea name="Notes" cols="40" rows="4" id="Notes"></textarea></td> </tr> </table> </form> </body> </html>
Then I target a page that does the ADD:
PHP Syntax (Toggle Plain Text)
<?php // -- Add a record -- ServerConnect(); DB_Connect(); // Get values from form. $First_Name=$_POST['First_Name']; $Last_Name=$_POST['Last_Name']; $Email=$_POST['Email']; $Contact_Phone=$_POST['Contact_Phone']; $Address=$_POST['Address']; $City=$_POST['City']; $State=$_POST['State']; $Zip=$_POST['Zip']; $Username=$_POST['Username']; $Password=$_POST['Password']; $ADMIN=$_POST['ADMIN']; $Instrument=$_POST['Instrument']; $Notes=$_POST['Notes']; $sql="INSERT INTO Volunteers (First_Name, Last_Name, Email, Contact_Phone, Address, City, State, Zip, Username, Password, ADMIN, Instrument, Notes) VALUES ('$First_Name','$Last_Name','$Email','$Contact_Phone','$Address','$City','$State','$Zip','$Username','$Password','$ADMIN','$Instrument','$Notes')"; $result = mysql_query($sql) or die(mysql_error()); echo "<span class=\"style2\">Volunteer Added...</span>"; ?>
I, also, have a EDIT Volunteer page:
PHP Syntax (Toggle Plain Text)
<?php require_once('auth.php'); ?> <? include("inc/interface.php"); include("inc/funct.php"); ?> <?php // -- Add a record -- ServerConnect(); DB_Connect(); $id=$_GET['id']; $result=mysql_query("select * from Volunteers where id='$id'"); $row=mysql_fetch_assoc($result); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Village Of Hope Worship</title> <style type="text/css"> <!-- .style1 { font-size: 24px; font-weight: bold; } .style3 { font-size: 12px; font-weight: bold; font-style: italic; } .style5 { font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #0000FF; } --> </style> </head> <body> <table width="505" border="0" align="center" cellpadding="2" cellspacing="2"> <tr align="center" valign="middle"> <td height="42" colspan="2"><div align="center" class="style1">Edit Volunteer Entry </div></td> </tr> <tr> <td width="348"><span class="style3"><a href="volunteers_list.php">Back to LIST</a> </span></td> <td width="143" align="center" valign="middle"><div align="center"> <form id="form1" name="form1" method="post" action="volunteers_list_update.php"> <input type="reset" name="Reset" value="Reset" /> <input name="Submit" type="submit" id="Submit" value="SAVE" /> </div></td> </tr> <input type="hidden" name="id" value="<? echo $row['id']; ?>"> </table> <br /> <table width="504" border="0" align="center" cellpadding="2" cellspacing="2"> <tr> <td width="91"><div align="right"> <label>First Name: </label> </div></td> <td colspan="2"><input name="First_Name" type="text" id="First_Name" value="<? echo $row['First_Name']; ?>" maxlength="25" /></td> </tr> <tr> <td><div align="right"> <label>Last Name:</label> </div></td> <td colspan="2"><input name="Last_Name" type="text" id="Last_Name" size="42" value="<? echo $row['Last_Name']; ?>" maxlength="35" /></td> </tr> <tr> <td><div align="right"> <label>Email:</label> </div></td> <td colspan="2"><input name="Email" type="text" id="Email" size="42" value="<? echo $row['Email']; ?>" maxlength="60" /></td> </tr> <tr> <td><div align="right"> <label>Contact Phone:</label> </div></td> <td colspan="2"><input name="Contact_Phone" type="text" id="Contact_Phone"value="<? echo $row['Contact_Phone']; ?>" maxlength="20" /></td> </tr> <tr> <td><div align="right"> <label>Address:</label> </div></td> <td colspan="2"><input name="Address" type="text" id="Address" value="<? echo $row['Address']; ?>" size="42" maxlength="60" /></td> </tr> <tr> <td><div align="right"> <label>City/St/Zip:</label> </div></td> <td colspan="2"><input name="City" type="text" id="City" value="<? echo $row['City']; ?>" maxlength="30" /> <input name="State" type="text" id="State" size="3" value="<? echo $row['State']; ?>" maxlength="2" /> <input name="Zip" type="text" id="Zip" size="12" value="<? echo $row['Zip']; ?>" maxlength="10" /></td> </tr> <tr> <td> <div align="right"> <label>Username:</label> </div></td> <td colspan="2"><input name="Username" type="text" id="Username" value="<? echo $row['Username']; ?>" maxlength="20" /></td> </tr> <tr> <td><div align="right">Password:</div></td> <td colspan="2"><input name="Password" type="text" id="Password" value="<? echo $row['Password']; ?>" maxlength="20" /></td> </tr> <tr> <td><div align="right">ADMIN:</div></td> <td colspan="2"><input name="ADMIN" type="text" id="ADMIN" value="<? echo $row['ADMIN']; ?>" maxlength="2" /></td> </tr> <tr> <td><div align="right">Instruments:</div></td> <td width="116" align="center" valign="middle"> <div align="left"> <select name="Instrument" size="5" multiple="multiple" id="Instrument"> <option>Select from the list below...</option> <option value="Leader">Leader</option> <option value="Singer">Singer</option> <option value="Piano">Piano</option> <option value="Synth">Synth</option> <option value="Acoustic Guitar">Acoustic Guitar</option> <option value="Electric Guitar">Electric Guitar</option> <option value="Bass Guitar">Bass Guitar</option> <option value="Drums">Drums</option> <option value="Percussion">Percussion</option> <option value="Sax/Horn">Sax/Horn</option> <option value="Flute">Flute</option> </select> </div></td> <td width="277" align="center" valign="middle"><div align="left"><span class="style5">To select multiple, hold down your <br /> Command Key (MAC) or ALT (PC)</span></div></td> </tr> <tr> <td><div align="right">Special Notes: </div></td> <td colspan="2"><textarea name="Notes" cols="40" rows="4" id="Notes" value="<? echo $row['Notes']; ?>" ></textarea></td> </tr> </table> </form> </body> </html>
Then I target a page that does the UPDATE:
PHP Syntax (Toggle Plain Text)
<?php // -- Update a record -- ServerConnect(); DB_Connect(); // Get values from form. $id=$_POST['id']; $First_Name=$_POST['First_Name']; $Last_Name=$_POST['Last_Name']; $Email=$_POST['Email']; $Contact_Phone=$_POST['Contact_Phone']; $Address=$_POST['Address']; $City=$_POST['City']; $State=$_POST['State']; $Zip=$_POST['Zip']; $Username=$_POST['Username']; $Password=$_POST['Password']; $ADMIN=$_POST['ADMIN']; $Instrument=$_POST['Instrument']; $Notes=$_POST['Notes']; $sql="UPDATE Volunteers SET First_Name='$First_Name', Last_Name='$Last_Name', Email='$Email', Contact_Phone='$Contact_Phone', Address='$Address', City='$City', State='$State', Zip='$Zip', Username='$Username', Password='$Password', ADMIN='$ADMIN', Instrument='$Instrument', Notes='$Notes' WHERE id='$id'"; //echo "$sql"; $result = mysql_query($sql) or die(mysql_error()); echo "<span class=\"style2\">Volunteer Updated...</span>"; ?>
Three issues I need help to resolve:
1) When I select more then one choice from my Instrument field, then select the ADD button, the multiple selections do not carry over to my mySQL table record. Only one value does. The field is a varchar type with plenty of characters allowed.
2) Once I get the data into my DB properly, I need to then be able to have it display properly when I retrieve it on my Update Volunteer Entry page.
3) Eventually, I will establish a Performance Date table in which I will assign Volunteers to performances. When I add a Volunteer:
IF they have multiple instruments they play, I would to provide the user a menu of choices for the field, based of the field Volunteer::Instrument
ELSE
Display it this way: Instrument - Piano
END IF
On a personal note, this is a online DB I am working on for the local Rescue Mission (Homeless Shelter Program). This is my first PHP/mySQL project, so I got much to learn. But once I see how things are done, I catch on pretty quickly.
If there is anyone who would like to volunteer their services to assist me in finishing this project for them, I could make sure you get a Letter of Donated Services from the the Non-Profit organization(tax right off). Just give me a PRIVATE message, if you are willing to help.
Thanks and I appreciate any help that can be offered.
You need to change the name of the instrument select element to "Instrument[]". Then when adding to the database run
On the update page you will need to put the instruments into an array and loop through them checking if they are selected (You should also do this for the add page as it will help keep the data uniform and prevent errors).
ex.
and then echo
Make sure you sanitize your input by adding field validation and using
implode(',',$Instrument); because it will return an array of selected elements. Implode will put them into a comma separated string so it can be put into the database.On the update page you will need to put the instruments into an array and loop through them checking if they are selected (You should also do this for the add page as it will help keep the data uniform and prevent errors).
ex.
PHP Syntax (Toggle Plain Text)
$selected = explode(',',$Instruments); //instrument data from database $instruments = array('Leader','Singer','Piano'); $options = ''; foreach( $instruments as $inst ) { $sel = ''; if ( in_array( $inst,$selected ) ) { $sel = 'selected="selected" '; } $options .= "<option {$sel}value=\"{$inst}\"></option>\n"; }
and then echo
$options where the options for the select should be in the update form.Make sure you sanitize your input by adding field validation and using
mysql_real_escape_string to prevent sql injection. Last edited by kkeith29; Jul 3rd, 2009 at 3:06 pm.
•
•
Join Date: Jul 2009
Posts: 42
Reputation:
Solved Threads: 0
•
•
•
•
You need to change the name of the instrument select element to "Instrument[]". Then when adding to the database runimplode(',',$Instrument);because it will return an array of selected elements. Implode will put them into a comma separated string so it can be put into the database.
On the update page you will need to put the instruments into an array and loop through them checking if they are selected (You should also do this for the add page as it will help keep the data uniform and prevent errors).
ex.
PHP Syntax (Toggle Plain Text)
$selected = explode(',',$Instruments); //instrument data from database $instruments = array('Leader','Singer','Piano'); $options = ''; foreach( $instruments as $inst ) { $sel = ''; if ( in_array( $inst,$selected ) ) { $sel = 'selected="selected" '; } $options .= "<option {$sel}value=\"{$inst}\"></option>\n"; }
and then echo$optionswhere the options for the select should be in the update form.
Make sure you sanitize your input by adding field validation and usingmysql_real_escape_stringto prevent sql injection.
I really appreciate it.
This is the add page. It submits to itself now since there is no reason to have another page process it.
Put this code on one page:
You can change where the errors and result go. You need to add validation to the forms.
I am working on the edit page.
Put this code on one page:
PHP Syntax (Toggle Plain Text)
<?php include 'auth.php'; ServerConnect(); DB_Connect(); $result = ''; $error = array(); if ( isset( $_POST['submit'] ) ) { foreach( $_POST as $key => $value ) { ${$key} = ( is_array( $value ) ? array_map( 'mysql_real_escape_string',$value ) : mysql_real_escape_string( $value ) ); } if ( empty( $First_Name ) ) { $error[] = "First Name is empty"; } //ect. need to add more validation for each field. search google and you will find many resources to help with form validation if ( count( $error ) == 0 ) { $Instrument = implode( ',',$Instrument ); mysql_query("INSERT INTO Volunteers (First_Name, Last_Name, Email, Contact_Phone, Address, City, State, Zip, Username, Password, ADMIN, Instrument, Notes) VALUES ('{$First_Name}','{$Last_Name}','{$Email}','{$Contact_Phone}','{$Address}','{$City}','{$State}','{$Zip}','{$Username}','{$Password}','{$ADMIN}','{$Instrument}','{$Notes}')") or die('Error: ' . mysql_error()); $result = "<span class=\"style2\">Volunteer Added...</span>"; } } $errstr = ''; if ( count( $error ) > 0 ) { $errstr = "<div id=\"error\">\n\t<ul>\n"; foreach( $error as $err ) { $errstr .= "\t\t<li>{$err}</li>\n"; } $errstr .= "\t</ul>\n</div>"; } echo <<<HTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Village Of Hope Worship</title> <style type="text/css"> <!-- .style1 { font-size: 24px; font-weight: bold; } .style3 { font-size: 12px; font-weight: bold; font-style: italic; } .style5 { font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #0000FF; } --> </style> </head> <body> <table width="505" border="0" align="center" cellpadding="2" cellspacing="2"> <tr align="center" valign="middle"> <td height="42" colspan="2"><div align="center" class="style1">New Volunteer Entry </div></td> </tr> <tr> <td width="348"><span class="style3"><a href="volunteers_list.php">Back to LIST</a> </span></td> <td width="143" align="center" valign="middle"><div align="center"> <form id="form1" name="form1" method="post" action="{$_SERVER['PHP_SELF']}"> <input type="reset" name="Reset" value="Reset" /> <input name="submit" type="submit" id="Submit" value="SAVE" /> </div></td> </tr> </table> <br /> {$errstr} <table width="504" border="0" align="center" cellpadding="2" cellspacing="2"> <tr> <td width="91"><div align="right"> <label>First Name: </label> </div></td> <td colspan="2"><input name="First_Name" type="text" id="First_Name" maxlength="25" /></td> </tr> <tr> <td><div align="right"> <label>Last Name:</label> </div></td> <td colspan="2"><input name="Last_Name" type="text" id="Last_Name" size="42" maxlength="35" /></td> </tr> <tr> <td><div align="right"> <label>Email:</label> </div></td> <td colspan="2"><input name="Email" type="text" id="Email" size="42" maxlength="60" /></td> </tr> <tr> <td><div align="right"> <label>Contact Phone:</label> </div></td> <td colspan="2"><input name="Contact_Phone" type="text" id="Contact_Phone" maxlength="20" /></td> </tr> <tr> <td><div align="right"> <label>Address:</label> </div></td> <td colspan="2"><input name="Address" type="text" id="Address" size="42" maxlength="60" /></td> </tr> <tr> <td><div align="right"> <label>City/St/Zip:</label> </div></td> <td colspan="2"><input name="City" type="text" id="City" maxlength="30" /> <input name="State" type="text" id="State" size="3" maxlength="2" /> <input name="Zip" type="text" id="Zip" size="12" maxlength="10" /></td> </tr> <tr> <td> <div align="right"> <label>Username:</label> </div></td> <td colspan="2"><input name="Username" type="text" id="Username" maxlength="20" /></td> </tr> <tr> <td><div align="right">Password:</div></td> <td colspan="2"><input name="Password" type="text" id="Password" maxlength="20" /></td> </tr> <tr> <td><div align="right">ADMIN:</div></td> <td colspan="2"><input name="ADMIN" type="text" id="ADMIN" maxlength="2" /></td> </tr> <tr> <td><div align="right">Instruments:</div></td> <td width="116" align="center" valign="middle"> <div align="left"> <select name="Instrument[]" size="5" multiple="multiple" id="Instrument"> <option>Select from the list below...</option> <option value="Leader">Leader</option> <option value="Singer">Singer</option> <option value="Piano">Piano</option> <option value="Synth">Synth</option> <option value="Acoustic Guitar">Acoustic Guitar</option> <option value="Electric Guitar">Electric Guitar</option> <option value="Bass Guitar">Bass Guitar</option> <option value="Drums">Drums</option> <option value="Percussion">Percussion</option> <option value="Sax/Horn">Sax/Horn</option> <option value="Flute">Flute</option> </select> </div></td> <td width="277" align="center" valign="middle"><div align="left"><span class="style5">To select multiple, hold down your <br />Command Key (MAC) or ALT (PC)</span></div></td> </tr> <tr> <td><div align="right">Special Notes: </div></td> <td colspan="2"><textarea name="Notes" cols="40" rows="4" id="Notes"></textarea></td> </tr> </table> </form> {$result} </body> </html> HTML; ?>
You can change where the errors and result go. You need to add validation to the forms.
I am working on the edit page.
•
•
Join Date: Jul 2009
Posts: 42
Reputation:
Solved Threads: 0
•
•
•
•
You need to change the name of the instrument select element to "Instrument[]". Then when adding to the database runimplode(',',$Instrument);because it will return an array of selected elements. Implode will put them into a comma separated string so it can be put into the database.
On the update page you will need to put the instruments into an array and loop through them checking if they are selected (You should also do this for the add page as it will help keep the data uniform and prevent errors).
ex.
PHP Syntax (Toggle Plain Text)
$selected = explode(',',$Instruments); //instrument data from database $instruments = array('Leader','Singer','Piano'); $options = ''; foreach( $instruments as $inst ) { $sel = ''; if ( in_array( $inst,$selected ) ) { $sel = 'selected="selected" '; } $options .= "<option {$sel}value=\"{$inst}\"></option>\n"; }
and then echo$optionswhere the options for the select should be in the update form.
Make sure you sanitize your input by adding field validation and usingmysql_real_escape_stringto prevent sql injection.
PHP Syntax (Toggle Plain Text)
<?php // -- Edit record -- ServerConnect(); DB_Connect(); $id=$_GET['id']; $result=mysql_query("select * from Volunteers where id='$id'"); $row=mysql_fetch_assoc($result); $Instruments1 = $row['Instrument']; $selected = explode(',',$Instruments1); //instrument data from database $instruments = array('Select from the list below...','Leader','Singer','Piano','Synth','Acoustic Guitar','Electric Guitar','Bass Guitar','Drums','Percussion','Sax/Flute','Flute'); $options = ''; foreach( $instruments as $inst ) { $sel = ''; if ( in_array( $inst,$selected ) ) { $sel = 'selected="selected" '; } $options .= "<option {$sel}value=\"{$inst}\"></option>\n"; } ?>
And my HTML is formatted like this:
PHP Syntax (Toggle Plain Text)
<tr> <td><div align="right">Instruments:</div></td> <td width="116" align="center" valign="middle"> <div align="left"> <select name="Instrument[]" size="5" multiple="multiple" id="Instrument"> <? echo $options; //<option>Select from the list below...</option> //<option value="Leader">Leader</option> //<option value="Singer">Singer</option> //<option value="Piano">Piano</option> //<option value="Synth">Synth</option> //<option value="Acoustic Guitar">Acoustic Guitar</option> //<option value="Electric Guitar">Electric Guitar</option> //<option value="Bass Guitar">Bass Guitar</option> //<option value="Drums">Drums</option> //<option value="Percussion">Percussion</option> //<option value="Sax/Horn">Sax/Horn</option> //<option value="Flute">Flute</option> ?> </select> </div></td> <td width="277" align="center" valign="middle"><div align="left"><span class="style5">To select multiple, hold down your <br /> Command Key (MAC) or ALT (PC)</span></div></td> </tr> <tr> <td><div align="right">Special Notes: </div></td> <td colspan="2"><textarea name="Notes" cols="40" rows="4" id="Notes" value="<? echo $row['Notes']; ?>" ></textarea></td> </tr> </table> </form> </body> </html>
Hopefully it something simple in the HTML or PHP.
It's weird though... It shows a List (displayed very narrow) with the correct rows highlighted but NO VALUES ???
Thanks!!!
It is my fault. I get to typing and miss simple stuff.
Change:
to
Change:
PHP Syntax (Toggle Plain Text)
$options .= "<option {$sel}value=\"{$inst}\"></option>\n";
PHP Syntax (Toggle Plain Text)
$options .= "<option {$sel}value=\"{$inst}\">{$inst}</option>\n";
Google is your friend.
Use [code] tags.
If you have found a solution to your problem, please mark the thread as SOLVED.
Use [code] tags.
If you have found a solution to your problem, please mark the thread as SOLVED.
•
•
Join Date: Jul 2009
Posts: 42
Reputation:
Solved Threads: 0
•
•
•
•
It is my fault. I get to typing and miss simple stuff.
Change:
toPHP Syntax (Toggle Plain Text)
$options .= "<option {$sel}value=\"{$inst}\"></option>\n";
PHP Syntax (Toggle Plain Text)
$options .= "<option {$sel}value=\"{$inst}\">{$inst}</option>\n";
Last edited by dwdata; Jul 3rd, 2009 at 10:04 pm.
![]() |
Similar Threads
- Multi-Field List Box (VB.NET)
- AJAX created input field does not work in FireFox (JavaScript / DHTML / AJAX)
- Problem with input (ASP)
- Number input problem. (C++)
- php connection to mysql headache (PHP)
- Input for a solution to matrix problem (C)
- List <char *> Problem (C)
Other Threads in the PHP Forum
- Previous Thread: Regex help
- Next Thread: emailto option in php
| Thread Tools | Search this Thread |
# 5.2.10 ajax apache api array beginner binary broken cakephp checkbox class clean clients cms code cron curl database date display dissertation dynamic echo echo$_get[x]changingitintovariable... email error file files folder form forms function functions google href htaccess html image images include insert integration ip java javascript joomla ldap legislation limit link local login loop mail memberships menu mlm multiple multipletables mysql mysqlquery oop open paypal pdf persist php problem query radio random recursion regex remote rss script search server sessions sms soap sockets source space spam sql syntax system table tutorial update upload url validator variable video web xml youtube






