- Fórum WMO
- → Viewing Profile: Tópicos: Theme
Community Stats
- Group Usuários
- Active Posts 18
- Profile Views 1366
- Member Title Novato no fórum
- Age 37 years old
- Birthday December 23, 1986
-
Sexo
Não informado
-
Localidade
Portugal
-
Interesses
Informatica, Video, Fotografia e Audio
Contact Information
- Windows Live andre.v.goncalves@gmail.com
0
Neutral
User Tools
Friends
Theme hasn't added any friends yet.
Latest Visitors
-
Guest
04/11/2007, 02:14
Topics I've Started
Connecção Mysql
29/04/2005, 14:43
ao tentar fazer a connecção com o mysql para começar a fazer o site em php deu-me o seguinte erro da imagem em anexo... agradeço qualquer ajuda. obrigado
Php No Dream
06/04/2005, 15:28
estou a fazer o meu site no dreamweaver mas nao sei como interagir o php com o mysql vou a application>database>mysql connection so que nao sei o mysql server, onde posso ver isso? e o username e password é os do ftp?
obrigado
obrigado
Registo
16/03/2005, 12:54
eu nao sei qual é o erro, fiz a pagina de registo, com o insert record e depois fiz as validações so que kd vou para inserir registo da erro e acaba por não enviar os dados para a base de dados, n percebo uito do codigo visto nao ser programador, agrdeço ajuda. ai vai o cadigo:
para melhor viualização podem ir ao site http://users.prof200...Andre/index.htm
n tem conteudos porque nao consigo fazer a inserção de registos
agradeço qualquer ajuda
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <!--#include file="Connections/connec_dados.asp" --> <% ' *** Edit Operations: declare variables Dim MM_editAction Dim MM_abortEdit Dim MM_editQuery Dim MM_editCmd Dim MM_editConnection Dim MM_editTable Dim MM_editRedirectUrl Dim MM_editColumn Dim MM_recordId Dim MM_fieldsStr Dim MM_columnsStr Dim MM_fields Dim MM_columns Dim MM_typeArray Dim MM_formVal Dim MM_delim Dim MM_altVal Dim MM_emptyVal Dim MM_i MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME")) If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString) End If ' boolean to abort record edit MM_abortEdit = false ' query string to execute MM_editQuery = "" %> <% ' *** Insert Record: set variables If (CStr(Request("MM_insert")) = "form1") Then MM_editConnection = MM_connec_dados_STRING MM_editTable = "Registo" MM_editRedirectUrl = "suc_registo.asp" MM_fieldsStr = "username|value|nome|value|apelido|value|select4|value|select|value|select2|value|select3|value|email|value|password|value|Cidade|value|select5|value" MM_columnsStr = "username|',none,''|nome|',none,''|apelido|',none,''|Sexo|',none,''|Dia|',none,''|Mes|',none,''|Ano|',none,''|email|',none,''|password|',none,''|Cidade|',none,''|País|',none,''" ' create the MM_fields and MM_columns arrays MM_fields = Split(MM_fieldsStr, "|") MM_columns = Split(MM_columnsStr, "|") ' set the form values For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i))) Next ' append the query string to the redirect URL If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString Else MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString End If End If End If %> <% ' *** Insert Record: construct a sql insert statement and execute it Dim MM_tableValues Dim MM_dbValues If (CStr(Request("MM_insert")) <> "") Then ' create the sql insert statement MM_tableValues = "" MM_dbValues = "" For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_formVal = MM_fields(MM_i+1) MM_typeArray = Split(MM_columns(MM_i+1),",") MM_delim = MM_typeArray(0) If (MM_delim = "none") Then MM_delim = "" MM_altVal = MM_typeArray(1) If (MM_altVal = "none") Then MM_altVal = "" MM_emptyVal = MM_typeArray(2) If (MM_emptyVal = "none") Then MM_emptyVal = "" If (MM_formVal = "") Then MM_formVal = MM_emptyVal Else If (MM_altVal <> "") Then MM_formVal = MM_altVal ElseIf (MM_delim = "'") Then ' escape quotes MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'" Else MM_formVal = MM_delim + MM_formVal + MM_delim End If End If If (MM_i <> LBound(MM_fields)) Then MM_tableValues = MM_tableValues & "," MM_dbValues = MM_dbValues & "," End If MM_tableValues = MM_tableValues & MM_columns(MM_i) MM_dbValues = MM_dbValues & MM_formVal Next MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")" If (Not MM_abortEdit) Then ' execute the insert Set MM_editCmd = Server.CreateObject("ADODB.Command") MM_editCmd.ActiveConnection = MM_editConnection MM_editCmd.CommandText = MM_editQuery MM_editCmd.Execute MM_editCmd.ActiveConnection.Close If (MM_editRedirectUrl <> "") Then Response.Redirect(MM_editRedirectUrl) End If End If End If %> <% Dim paises Dim paises_numRows Set paises = Server.CreateObject("ADODB.Recordset") paises.ActiveConnection = MM_connec_dados_STRING paises.Source = "SELECT * FROM Paises" paises.CursorType = 0 paises.CursorLocation = 2 paises.LockType = 1 paises.Open() paises_numRows = 0 %> <% Dim inserir Dim inserir_numRows Set inserir = Server.CreateObject("ADODB.Recordset") inserir.ActiveConnection = MM_connec_dados_STRING inserir.Source = "SELECT Ano, apelido, Cidade, Dia, email, Mes, nome, País, password, Sexo, username FROM Registo" inserir.CursorType = 0 inserir.CursorLocation = 2 inserir.LockType = 1 inserir.Open() inserir_numRows = 0 %> <% Dim ano Dim ano_numRows Set ano = Server.CreateObject("ADODB.Recordset") ano.ActiveConnection = MM_connec_dados_STRING ano.Source = "SELECT * FROM Ano" ano.CursorType = 0 ano.CursorLocation = 2 ano.LockType = 1 ano.Open() ano_numRows = 0 %> <% Dim mes Dim mes_numRows Set mes = Server.CreateObject("ADODB.Recordset") mes.ActiveConnection = MM_connec_dados_STRING mes.Source = "SELECT * FROM mes" mes.CursorType = 0 mes.CursorLocation = 2 mes.LockType = 1 mes.Open() mes_numRows = 0 %> <% Dim Dia Dim Dia_numRows Set Dia = Server.CreateObject("ADODB.Recordset") Dia.ActiveConnection = MM_connec_dados_STRING Dia.Source = "SELECT * FROM dia" Dia.CursorType = 0 Dia.CursorLocation = 2 Dia.LockType = 1 Dia.Open() Dia_numRows = 0 %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>André Gonçalves</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .style1 { color: #000066; font-weight: bold; } body { background-image: url(fundo.jpg); } --> </style> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_validateForm() { //v4.0 var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments; for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]); if (val) { nm=val.name; if ((val=val.value)!="") { if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n'; } else if (test!='R') { num = parseFloat(val); if (isNaN(val)) errors+='- '+nm+' must contain a number.\n'; if (test.indexOf('inRange') != -1) { p=test.indexOf(':'); min=test.substring(8,p); max=test.substring(p+1); if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n'; } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; } } if (errors) alert('The following error(s) occurred:\n'+errors); document.MM_returnValue = (errors == ''); } //--> </script> </head> <body> <div align="center"> <p align="center" class="style1">Registo De Utilizadores </p> </div> <p> </p> <form action="<%=MM_editAction%>" method="POST" name="form1" onSubmit="MM_validateForm('username','','R','nome','','R','apelido','','R','email','','RisEmail','Cidade','','R','password','','R');return document.MM_returnValue"> <table align="center"> <tr valign="baseline"> <td nowrap align="right">Username:</td> <td> <input type="text" name="username" value="" size="32"> </td> </tr> <tr valign="baseline"> <td nowrap align="right">Nome:</td> <td> <input type="text" name="nome" value="" size="32"> </td> </tr> <tr valign="baseline"> <td nowrap align="right">Apelido:</td> <td> <input type="text" name="apelido" value="" size="32"> </td> </tr> <tr valign="baseline"> <td nowrap align="right">Sexo:</td> <td> <select name="select4"> <option value="Masculino">Masculino</option> <option value="Feminino">Feminino</option> </select> </td> </tr> <tr valign="baseline"> <td nowrap align="right">Data nascimento :</td> <td><select name="select"> <% While (NOT ano.EOF) %> <option value="<%=(ano.Fields.Item("Ano").Value)%>"><%=(ano.Fields.Item("Ano").Value)%></option> <% ano.MoveNext() Wend If (ano.CursorType > 0) Then ano.MoveFirst Else ano.Requery End If %> </select> / <select name="select2"> <% While (NOT mes.EOF) %> <option value="<%=(mes.Fields.Item("Mês").Value)%>"><%=(mes.Fields.Item("Mês").Value)%></option> <% mes.MoveNext() Wend If (mes.CursorType > 0) Then mes.MoveFirst Else mes.Requery End If %> </select> / <select name="select3"> <% While (NOT Dia.EOF) %> <option value="<%=(Dia.Fields.Item("Dia").Value)%>"><%=(Dia.Fields.Item("Dia").Value)%></option> <% Dia.MoveNext() Wend If (Dia.CursorType > 0) Then Dia.MoveFirst Else Dia.Requery End If %> </select> </td> </tr> <tr valign="baseline"> <td nowrap align="right">Email:</td> <td> <input type="text" name="email" value="" size="32"> </td> </tr> <tr valign="baseline"> <td nowrap align="right">Password:</td> <td> <input type="password" name="password" value="" size="32"> </td> </tr> <tr valign="baseline"> <td nowrap align="right">Cidade:</td> <td> <input type="text" name="Cidade" value="" size="32"> </td> </tr> <tr valign="baseline"> <td nowrap align="right">País:</td> <td><select name="select5"> <% While (NOT paises.EOF) %> <option value="<%=(paises.Fields.Item("País").Value)%>"><%=(paises.Fields.Item("País").Value)%></option> <% paises.MoveNext() Wend If (paises.CursorType > 0) Then paises.MoveFirst Else paises.Requery End If %> </select> </td> </tr> <tr valign="baseline"> <td nowrap align="right"> </td> <td> <input type="submit" value="Inserir"> </td> </tr> </table> <input type="hidden" name="MM_insert" value="form1"> </form> </body> </html> <% paises.Close() Set paises = Nothing %> <% inserir.Close() Set inserir = Nothing %> <% ano.Close() Set ano = Nothing %> <% mes.Close() Set mes = Nothing %> <% Dia.Close() Set Dia = Nothing %>
para melhor viualização podem ir ao site http://users.prof200...Andre/index.htm
n tem conteudos porque nao consigo fazer a inserção de registos
agradeço qualquer ajuda
Iframe
15/03/2005, 22:21
usei o seguinte codigo para mudar a cor da barra de rolagem
<style>
<!--
BODY
{
SCROLLBAR-FACE-COLOR: #A6BAEE;
SCROLLBAR-HIGHLIGHT-COLOR: #A6BAEE;
SCROLLBAR-SHADOW-COLOR: #000000;
SCROLLBAR-3DLIGHT-COLOR: #000000;
SCROLLBAR-ARROW-COLOR: #000000;
SCROLLBAR-TRACK-COLOR: #A6BAEE;
SCROLLBAR-DARKSHADOW-COLOR: #A6BAEE;
}
-->
</style>
o problema é que so muda a barra do browser e eu queria que fosse a barra de rolagem dentro do iframe.
obrigado
<style>
<!--
BODY
{
SCROLLBAR-FACE-COLOR: #A6BAEE;
SCROLLBAR-HIGHLIGHT-COLOR: #A6BAEE;
SCROLLBAR-SHADOW-COLOR: #000000;
SCROLLBAR-3DLIGHT-COLOR: #000000;
SCROLLBAR-ARROW-COLOR: #000000;
SCROLLBAR-TRACK-COLOR: #A6BAEE;
SCROLLBAR-DARKSHADOW-COLOR: #A6BAEE;
}
-->
</style>
o problema é que so muda a barra do browser e eu queria que fosse a barra de rolagem dentro do iframe.
obrigado
Forgot Password
14/03/2005, 22:44
gostava de saber onde posso ir no dreamweaver fazer um "forgot password" para quem perdeu a password receber um email com a pass.
obrigado
obrigado
- Fórum WMO
- → Viewing Profile: Tópicos: Theme
- Privacy Policy
- Regras ·