Ir para conteúdo
Fórum Script Brasil

reeges_silva

Membros
  • Total de itens

    5
  • Registro em

  • Última visita

Sobre reeges_silva

  • Data de Nascimento 22/07/1983

Perfil

  • Gender
    Male
  • Location
    brasil

Contatos

  • Skype
    reeges_silva@hotmail.com

reeges_silva's Achievements

0

Reputação

  1. Boa tarde a todos, sou novo em php e preciso muito de ajuda . Preciso realizar uma home page onde o usuário ao fazer o upload das fotos ele já informa qual a foto será a capa desse álbum com dados como data e nome do Evento/Album. Também se há possibilidade de definir um limite de tamanho das fotos. Desde já agradeço pela ajuda e aguardo a ajuda de vc's.
  2. ola galera vou postar novamente o meu codigo fonte que a primeira ficou meio bagunçado : codigo fonte : <?php require_once('Connections/ipedapae.php');?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $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; } } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO iped (nome, cpf, datanascimento, endereco, complemento, bairro, cep, telefonemovel, telefonerecado, email, cidade, uf, profissao, localtrabalho) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['nome'], "text"), GetSQLValueString($_POST['cpf'], "text"), GetSQLValueString($_POST['datanascimento'], "date"), GetSQLValueString($_POST['endereco'], "text"), GetSQLValueString($_POST['complemento'], "text"), GetSQLValueString($_POST['bairro'], "text"), GetSQLValueString($_POST['cep'], "int"), GetSQLValueString($_POST['telefonemovel'], "text"), GetSQLValueString($_POST['telefonerecado'], "text"), GetSQLValueString($_POST['email'], "text"), GetSQLValueString($_POST['cidade'], "text"), GetSQLValueString($_POST['uf'], "text"), GetSQLValueString($_POST['profissao'], "text"), GetSQLValueString($_POST['localtrabalho'], "text")); $base= mysql_select_db($database_ipedapae,"ipedapae"); $Result1 = mysql_query($insertSQL, $base) or die(mysql_error()); echo ''; $insertGoTo = "HomeIpedApae.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } ?>
  3. Bom dia galera estou com um problema e sou iniciante em php e preciso da ajuda estou com o seguinte erro ao inserir os dados : ========================================================================================================= Warning: mysql_select_db() expects parameter 2 to be resource, string given in /home/u522807324/public_html/HomeIpedApae.php on line 56 Warning: mysql_query() expects parameter 2 to be resource, null given in /home/u522807324/public_html/HomeIpedApae.php on line 57 ========================================================================================================= segue abaixo o meu codigo fonte : /////////////////////////////////////////////////////////////////////////////////////////////////////// <?php require_once('Connections/ipedapae.php');?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $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; } } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO iped (nome, cpf, datanascimento, endereco, complemento, bairro, cep, telefonemovel, telefonerecado, email, cidade, uf, profissao, localtrabalho) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['nome'], "text"), GetSQLValueString($_POST['cpf'], "text"), GetSQLValueString($_POST['datanascimento'], "date"), GetSQLValueString($_POST['endereco'], "text"), GetSQLValueString($_POST['complemento'], "text"), GetSQLValueString($_POST['bairro'], "text"), GetSQLValueString($_POST['cep'], "int"), GetSQLValueString($_POST['telefonemovel'], "text"), GetSQLValueString($_POST['telefonerecado'], "text"), GetSQLValueString($_POST['email'], "text"), GetSQLValueString($_POST['cidade'], "text"), GetSQLValueString($_POST['uf'], "text"), GetSQLValueString($_POST['profissao'], "text"), GetSQLValueString($_POST['localtrabalho'], "text")); $base= mysql_select_db($database_ipedapae,"ipedapae"); $Result1 = mysql_query($insertSQL, $base) or die(mysql_error()); echo ''; $insertGoTo = "HomeIpedApae.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } ?> ///////////////////////////////////////////////////////////////////////////////////////////////// ta ai meu codigo quem puder me ajudar por favor preciso muito de rodar esse codigo .
  4. reeges_silva

    Combo Box

    ***************** vou explicar melhor a minha possivel ideia... seria assim.... teria um list box com as unidades (dados vindo do bda) e ao lado um listbox com os setores pertecentes a cada unidade (dados vindos do bda). A minha ideia é ao usuario selecionar uma unidade o list box seguinte carregue as informaçoes devidas da unidade selecionada. No entento, se isso for o caso de usar Ajax, pensei em colocar um "botão" ao lado da primeira listbox para fazer esse processo e abri as informações seguintes...não sei se minha idéia é tão facil assim.....mas é a necessidade q meu projeto ta tendo no momento...e desde já agradeço a atenção ai....só pra maiores detalhes... o meu bda ta com a seguinte relação onde tenho 1unidade para Nsetores......se quiser posso postar a minha tentativa do codigo aqui...um grande abraço
  5. reeges_silva

    Combo Box

    Ola bom dia...sou novato em php, estou desenvolvendo um pequeno sistema e me surgiu a seguinte situação e gostaria de contar com a ajuda deste forum para esta situação. Tenho um Bda onde tenho 5 unidades e cada unidade tem sua relação de atendimento, gostaria de criar um combo box onde ao selecionar a unidade a pagina carregaria as informações precisas da unidade selecionada. Estou trabalhando com Dreamweaver Cs3 e Xampp. Um Grande abraço a todos os programadores deste forum
×
×
  • Criar Novo...