Jump to content

simple php doubt


ramu_rp2005

Recommended Posts

I've a code like this below:

<BODY background=images/ltgray_lines1.gif text=000000> <br><br><br><br><br><font size=2 face="Garamond">

<FORM method=GET name="searchform"><center>
<table>
<tr><td>Search</td>
<td><select name="pattern" >
<option value="streamtype">Type</option>
<option value="streamname">Name</option>
<option value="videopid"> Vid Pid</option>
<option value="audiopid">Aud Pid</option>
<option value="pcrpid">Pid</option>
<option value="clockrate">Clock Rate</option>
<option value="videotype">ideo type</option>
<option value="ac3bitrate">A3 Bit</option>
<option value="ac3mod">A3 Mod</option>
<option value="samplerate">Sam Rate</option>
<option value="resolution">Res</option>
<option value="profile">Prof</option>
</select></td></tr><br><br>
</table>
<br><br>
<input type="button" value="Search" onclick=selectstr()>
</center>
</FORM> </font>
</BODY>



Now my doubt is how can i take the value of the combo and submit it to another form.My friend gave the cod e below. but can anyone explain what does it mean.the code is below:
wht does "str=str=" mean.

function selectstr()
{

frm=document.searchform
str=str = frm.pattern.options[frm.pattern.selectedIndex].value
location.href="setstring.php?string="+str
}
Link to comment
Share on other sites

str generaly means string you friend probably mistyped it he probably meant to type str=the rest of your code
because str=str=the rest of your code will cause a parser error
it would actually caus an error in any scripting language
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.