Paulo TI Rede Brasil Postado Novembro 17, 2010 Denunciar Share Postado Novembro 17, 2010 boa tardepreciso de ajuda tenho um menu de salto e queria trocar por uma caixa de textose possivel que faça busca no select mais não sei como colocar o botao enviar para passar as informaçoesrsrsrsra pagina atual é<?php require_once('Connections/data.php'); ?><?phpif (!isset($_SESSION)) { session_start();}$MM_authorizedUsers = "";$MM_donotCheckaccess = "true";// *** Restrict Access To Page: Grant or deny access to this pagefunction isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { // For security, start by assuming the visitor is NOT authorized. $isValid = False; // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. // Therefore, we know that a user is NOT logged in if that Session variable is blank. if (!empty($UserName)) { // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. // Parse the strings into arrays. $arrUsers = Explode(",", $strUsers); $arrGroups = Explode(",", $strGroups); if (in_array($UserName, $arrUsers)) { $isValid = true; } // Or, you may restrict access to only certain users based on their username. if (in_array($UserGroup, $arrGroups)) { $isValid = true; } if (($strUsers == "") && true) { $isValid = true; } } return $isValid; }$MM_restrictGoTo = "index.php";if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) { $MM_qsChar = "?"; $MM_referrer = $_SERVER['PHP_SELF']; if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&"; if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0) $MM_referrer .= "?" . $QUERY_STRING; $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck= . urlencode($MM_referrer); header("Location: ". $MM_restrictGoTo); exit;}?><?phpif (!function_exists("GetSQLValueString")) {function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue;}}mysql_select_db($database_data, $data);$query_Recordset1 = "SELECT * FROM cliente";$Recordset1 = mysql_query($query_Recordset1, $data) or die(mysql_error());$row_Recordset1 = mysql_fetch_assoc($Recordset1);$totalRows_Recordset1 = mysql_num_rows($Recordset1);?><!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=utf-8" /><title>Untitled Document</title><script src="SpryAssets/SpryValidationSelect.js" type="text/javascript"></script><script type="text/javascript"><!--function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0;}//--></script><link href="css/style.css" rel="stylesheet" type="text/css" /><link href="SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css" /></head><body><table width="100%" border="0" cellpadding="0" cellspacing=" 0"> <tr> <td width="15"><div align="center"><img src="Imagens/cadeado.gif" alt="" width="30" height="30" /></div></td> <td><b><span class="style1">Goiás Atacado Distribuidor</span> -<b><b><a href="fechar.php"> Fechar Janela</a></b></b></b></td> </tr> <tr> <td> </td> <td><table border="0" cellspacing="3" cellpadding="0" class="verdana" width="498" > <form action="" method="post" name="form1" id="form1"> <tr> <td width="523" height="40" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="200" valign="top"><b>Técnico:<br /> <input name="textfield" type="text" id="textfield" value="<?php echo $_SESSION['MM_Username]; ?>" /> <br /> </b></td> <td valign="top"><b>RCA:</b><br /> <span class="posted" id="spryselect2"> <select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('parent',this,0)"> <option value="">Selecione</option> <?phpdo { ?> <option value="add_os1.php?recordID=<?php echo $row_Recordset1['codigo']; ?>"><?php echo $row_Recordset1['cpf']?></option> <?php} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); $rows = mysql_num_rows($Recordset1); if($rows > 0) { mysql_data_seek($Recordset1, 0); $row_Recordset1 = mysql_fetch_assoc($Recordset1); }?> </select> <span class="selectRequiredMsg">Selecione um item.</span></span> <label></label> <span id="spryselect1"><span class="selectRequiredMsg">Selecione um item.</span></span><br /></td> </tr> </table></td> </tr> </form> </table></td> </tr></table><p> </p><script type="text/javascript"><!--var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1");var spryselect2 = new Spry.Widget.ValidationSelect("spryselect2");//--></script></body></html><?phpmysql_free_result($Recordset1);?> Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 Paulo TI Rede Brasil Postado Janeiro 10, 2011 Autor Denunciar Share Postado Janeiro 10, 2011 resolvido Citar Link para o comentário Compartilhar em outros sites More sharing options...
Pergunta
Paulo TI Rede Brasil
boa tarde
preciso de ajuda tenho um menu de salto e queria trocar por uma caixa de texto
se possivel que faça busca no select
mais não sei como colocar o botao enviar para passar as informaçoes
rsrsrsr
a pagina atual é
<?php require_once('Connections/data.php'); ?><?php
if (!isset($_SESSION)) {
session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
// For security, start by assuming the visitor is NOT authorized.
$isValid = False;
// When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
}
// Or, you may restrict access to only certain users based on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
}
if (($strUsers == "") && true) {
$isValid = true;
}
}
return $isValid;
}
$MM_restrictGoTo = "index.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)
$MM_referrer .= "?" . $QUERY_STRING;
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck= . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
}
?><?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_data, $data);
$query_Recordset1 = "SELECT * FROM cliente";
$Recordset1 = mysql_query($query_Recordset1, $data) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><!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=utf-8" />
<title>Untitled Document</title>
<script src="SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing=" 0">
<tr>
<td width="15"><div align="center"><img src="Imagens/cadeado.gif" alt="" width="30" height="30" /></div></td>
<td><b><span class="style1">Goiás Atacado Distribuidor</span> -<b><b><a href="fechar.php"> Fechar Janela</a></b></b></b></td>
</tr>
<tr>
<td> </td>
<td><table border="0" cellspacing="3" cellpadding="0" class="verdana" width="498" >
<form action="" method="post" name="form1" id="form1">
<tr>
<td width="523" height="40" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="200" valign="top"><b>Técnico:<br />
<input name="textfield" type="text" id="textfield" value="<?php echo $_SESSION['MM_Username]; ?>" />
<br />
</b></td>
<td valign="top"><b>RCA:</b><br />
<span class="posted" id="spryselect2">
<select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('parent',this,0)">
<option value="">Selecione</option>
<?php
do {
?>
<option value="add_os1.php?recordID=<?php echo $row_Recordset1['codigo']; ?>"><?php echo $row_Recordset1['cpf']?></option>
<?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
$rows = mysql_num_rows($Recordset1);
if($rows > 0) {
mysql_data_seek($Recordset1, 0);
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
}
?>
</select>
<span class="selectRequiredMsg">Selecione um item.</span></span>
<label></label>
<span id="spryselect1"><span class="selectRequiredMsg">Selecione um item.</span></span><br /></td>
</tr>
</table></td>
</tr>
</form>
</table></td>
</tr>
</table>
<p> </p>
<script type="text/javascript">
<!--
var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1");
var spryselect2 = new Spry.Widget.ValidationSelect("spryselect2");
//-->
</script>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
Link para o comentário
Compartilhar em outros sites
1 resposta a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.