PHP: Variables From Multiple Forms
- From: Jared Wright <wright.jaredm@xxxxxxxxx>
- To: programmingblind@xxxxxxxxxxxxx
- Date: Sun, 19 Apr 2009 23:39:04 -0400
Hi All, I've been given the frontend for a search function that uses PHP
on an SQL database. The HTML I have actually has all the search fields
split into three forms with the search button not inside of any of them.
Is there a way I can get all these variables in a PHP script, or will
the HTML DOM of this search page need to be restructured? All the PHP
I've done has had all the relevant info passed with one form specifying
method and action. I can't find any examples of this setup online, but
I'd hoped to run the actual code past anyone that will have a look
before I go changing this HTML frontend, because I could very easily
mess up its presentation elements. The relative bits of it are below,
and thanks in advanced for any thoughts. Hopefully the HTML code in the
contents of this message don't mess with too many mail clients.
Jared
Begin HTML:
<div id="mainContainer">
<div id="Column">
<div id="SubColumn">
<form name="basic">
<table width="98%" border="0" align="center">
<tr>
<td colspan="2"><h1>Basic Information</h1></td>
</tr>
<tr>
<td width="41%"><span class="style8">Title:</span></td>
<td width="59%" class="input">
<input type = "text" name = "title" size = "30" /> </td>
</tr>
<tr>
<td><span class="style8">Subject:</span></td>
<td><input type = "text" name = "subject" size = "30" /></td>
</tr>
<tr>
<td><span class="style8">Genre:</span></td>
<td><input type = "text" name = "genre" size = "30" /> </td>
</tr>
<tr>
<td><span class="style8">Content Type:</span></td>
<td><select name="dataFormat" id="dataFormat" style="width: 100%;">
<option value="NULL" ></option>
<option value="Audio" >Audio</option>
<option value="Video" >Video</option>
<option value="Other" >Other</option>
</select></td>
</tr>
<tr>
<td><span class="style8">Duration:</span></td>
<td><input type="text" name="Duration" size="30"/></td>
</tr>
<tr>
<td height="21"><span class="style8">Description:</span></td>
<td rowspan="3" valign="top"><textarea name="description" cols="24"
rows="4"></textarea>
</textarea></td>
</tr>
<tr>
<td height="35"> </td>
</tr>
<tr>
<td height="20"> </td>
</tr>
</table>
</form>
</div>
</div>
<div id="Column">
<div id="SubColumn">
<form name="format">
<table width="98%" border="0" align="center">
<tr>
<td colspan="2"><h1>Format Information</h1></td>
</tr>
<tr>
<td width="35%"><span class="style8">Client:</span></td>
<td width="65%"><input type = "text" name = "client" size = "30" /></td>
</tr>
<tr>
<td><span class="style8">Location:</span></td>
<td><input type="text" name="location" size="30"/></td>
</tr>
<tr>
<td><span class="style8">Media Type:</span></td>
<td><input type="text" name="mediaType" size="30"/></td>
</tr>
<tr>
<td><span class="style8">Data type:</span></td>
<td><input type="text" name="datatype" size="30"/></td>
</tr>
<tr>
<td><span class="style8">Generations:</span></td>
<td><input type="text" name="generations" size="30"/></td>
</tr>
<tr>
<td><span class="style8">Tech Specs:</span></td>
<td><input type="text" name="techSpecs" size="30" /></td>
</tr>
<tr>
<td><span class="style8">Relation ID:</span></td>
<td><input type="text" name="RelationID" size="30"/></td>
</tr>
</table>
</form>
</div>
</div>
<div id="Column" >
<div id="SubColumn">
<form name="addedMaterial" >
<table width="98%" border="0">
<tr>
<td colspan="2"><h1 align="left">Added Material</h1> </td>
</tr>
<tr>
<td width="40%"><span class="style8">Archived ID:</span></td>
<td width="60%"><input type="text" name="archivedID" size="30"/></td>
</tr>
<tr>
<td><span class="style8">Date Published:</span></td>
<td><input type="text" name="datePublished" size="30" /></td>
</tr>
<tr>
<td><span class="style8">Date Produced:</span></td>
<td><input name="dateProduced" type="text" size="30" /></td>
</tr>
<tr>
<td><span class="style8">pbCore Creator:</span></td>
<td><input type="text" name="pbCore" size="30"/></td>
</tr>
<tr>
<td><span class="style8">identifyer:</span></td>
<td><input type="text" name="identifyer" size="30"/></td>
</tr>
<tr>
<td><span class="style8">identifyer source:</span></td>
<td><input type="text" name="idSource" size="30"/></td>
</tr>
</table>
</form>
</div>
</div>
</div>
<!-- This clearing element should immediately follow the #mainContent
div in order to force the #container div to contain all child floats
--><br class="clearfloat" />
<div id="footer" >
<div id="SubmitArea" >
<table width="133" border="0" align="right" cellpadding="3" class="fltrt">
<tr>
<td width="56"> </td>
<td width="59"><div align="right">
<input name="Submit" type="button" class="searchButton" value="Search" />
</div></td>
</tr>
</table>
</div>
<!-- end #footer --></div>
<!-- end #container --></div>
End HTML
__________
View the list's information and change your settings at
http://www.freelists.org/list/programmingblind
Other related posts: