Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

If you are going to post PHP, HTML, CSS or any other code


  • Please log in to reply

#1
ScHwErV

ScHwErV

    Member 5k

  • Retired Staff
  • 21,285 posts
  • MVP
As a safety feature, the forum software doesnt allow the posting of certain lines of code. If you need to post your code for one of our experts to look at, use bbcode.

[html] [/html] [codebox] [/codebox] [sql] [/sql] [code]

examples:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>W3C HTML Home Page</title>
<meta name="keywords"
content="HTML, HTML 4, HTML 4.01, HTML 4.0, XHTML, XHTML 1.0, XHTML 1.1, XHTML Basic, Modularization of XHTML, XML Events, XHTML-Print, XHTML 2.0, HTML Activity, HTML Working Group" />
<meta name="description"
content="This is W3C's home page for the HTML Activity. Here you will find pointers to our specifications for HTML/XHTML, guidelines on how to use HTML/XHTML to the best effect, and pointers to related work at W3C." />
<link rel="stylesheet" type="text/css" href="markup.css" />
<link rel="stylesheet" type="text/css" href="../StyleSheets/public.css" />
<link rel="stylesheet" type="text/css" media="handheld"
href="style/handheld.css" />
<link rel="stylesheet" type="text/css" media="print" href="style/print.css" />


// associative arrayfunction build_select_box_from_array ($vals, $select_name, $checked_val = FALSE) {        /*                Takes one array, with the array keys being the displayed name and the                 array values as the values.                The second parameter is the name you want assigned to this form element.                The third parameter is optional.                 Pass the value of the item that should be checked.        */		$str = sprintf('<SELECT name="%s">', $select_name);		$optionStr = '<OPTION value="%s"%s>%s</OPTION>';		$selected = " selected";		$notSelected = "";		foreach ($vals as $key => $value)		{			if($value == $checked_val)			{				$sel = $selected;			}			else			{				$sel = $notSelected;			}			$str .= sprintf($optionStr, $value, $sel, $key);        }		$str .= "</SELECT>";		return $str;}

SELECT t.tid FROM a_table t WHERE t.val="This Value"

  • 0

Advertisements







Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP