How to solve the judgment in the phpform-php Tutorial

Source: Internet
Author: User
Tags php form
Judgment in the phpform {foreachfrom $ selectAryitemselect }{{ if $ select. idsid }}& nbsp ;{{$ select. name }}{ {if }{{ foreach} php form judgment
{Foreach from = $ selectAry item = select }}
{If $ select. id = sid }}
{$ Select. name }}
{/If }}
{{/ Foreach }}
I output it cyclically here, but I want him to output one that corresponds to the id in my form. how can I make a judgment? I cannot make a judgment like this.
If the judgment is gone, two outputs will be output.
PHP code
   


JScript code
  Function sendData () {var uid = document. getElementById ('den _ uid '). value; var sid = document. getElementById ('den _ Sid '). value; var text = document. getElementById ('part _ text '). value; var rideo = document. getElementsByName ('Part [is_good] '); var is_good; if (text = ''| text = 'Enter your opinion. the number of words is within 50 words ') {alert ('please give your opinion, otherwise the vote will be invalid! '); Return false;} alert (sid); for (var I = 0; I
  


------ Solution --------------------
Do you want to give the form a unique identifier?
Js, jquery, and others are not mentioned at all.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.