|
Well, I guess this means that you didn't really want our help.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hi,
I need some help, at least some guidelines where to start. Briefly, I am making a website where registered users will be able to upload their photos, create an album and some other functionality. Im new with PHP and mySQL, so have no clue where to start. Is the files would be stored in database together with other information with users details when they register, or it is some kind dedicated server part that only users can access?
the thing im making is like a part of facebook or any other social websites where u can upload a bunch o photos, put them together into album...plus you can comment on others etc..
Thank You for any suggestions.
|
|
|
|
|
If you're really new, why not use ASP.NET instead ? The tools are free, and the language and framework are much richer and more user friendly.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
|
thanks for help, but you missunderstood me a bit...
xamp didnt wor for some reason, thus I found cheap host and got everything online. For code editing and web development Im using Dreamweaver (older, still Macromedia but I think it is basicaly the same). For php I already read loads of tutorials, and probably will be fine with upload part. what I dont know is how to setup mySQL database that it could store physical files (images in my case) or it is done in some other way? any suggestions on that part?
thanx once more
|
|
|
|
|
You need to use PHPMyAdmin or get remote access credentials and use something like Navicat SQL. You shouldn't store the files in the database but store the path to the files on the server and then upload them into a non-accessible folder.
Database Fields:
id,
Name,
Path.
Then you can create a file which reads from the path and outputs the file when needed. So all in all there's a lot of testing to be done. So, I suggest trying to install XAMPP on your PC again - it really is worth it for testing. Use default settings and it should work. Then go to http://localhost/[^]
|
|
|
|
|
Hi Guys,
How am I be able to generate a 100,000 MySpace IDs? I am using VB.Net and MSACCESS as my local database where I suppose to save the 100,000 MySpace IDs, but I don't know how to do it.
Please help.
Thank you
hifiger2004
|
|
|
|
|
I can't imagine a non evil reason for you to want to do this.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi Christ,
I was able to create a script on this using the concept of test software, but as I tested it, you've helped me realize that the client I'm having now, who really wanted this to be done, I think, might have some bad motives. Well, since it's only a very short hour project, I immediately terminate the contract.
Thanks man.
Hifiger
hifiger2004
|
|
|
|
|
Hi , I'd appreciate to get help on that. I can't seem to have my notify mail sent after my user registrated. Weird enough, the process it just fine since I can see the new user info in my access database... I just don't get why the email is not sent. Syntax error? It's not complicated, User subscribes which in this case is called action = 1....
Thanks in advance..!!!
<!--METADATA TYPE="typelib"
UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library" -->
<!--METADATA TYPE="typelib"
UUID="00000205-0000-0010-8000-00AA006D2EA4"
NAME="ADODB Type Library" -->
<%
Dim action
action = Request.QueryString("action")
If action = 1 Then
Dim objConnection, objRecordset, SQLs, strUserID
Dim strPassword, strFname, strLname, strAddress, strCity, strCountry
Dim strZip, strUserType, strJoinDate, strEducation, strNewsletter, strEmail, strCareer,strUnion,strMalefemale,strExperience
Set objConnection = Server.CreateObject("ADODB.Connection")
Set objRecordset = Server.CreateObject("ADODB.Recordset")
objConnection.Open Application("ConnectionString")
strUserType= 0
strFname=Replace(Request.Form("firstname"), "'", "''")
strLname=Replace(Request.Form("lastname"), "'", "''")
strAddress=(Request.Form("address"))
strCity=(Request.Form("city"))
strZip=(Request.Form("zip"))
strCountry=(Request.Form("country"))
strEmail=(Request.Form("emailaddress"))
strPassword=(Request.Form("password"))
strCareer=(Request.Form("careerlevel"))
strEducation=(Request.Form("education"))
strJoinDate=(Request.Form("joindate"))
strNewsletter=(CInt(Request.Form("newsletter")))
strUnion = (Request.Form("Union"))
strMalefemale = (Request.Form("malefemale"))
strExperience = (Request.Form("experience"))
If strNewsletter <> 1 Then
strNewletter = 0
End If
' ## ERROR CONTROL ##
objConnection.Errors.Clear ' just to be safe, clear out any existing errors
'On Error Resume Next ' then IGNORE errors!
' Put parameters in registration database.
SQLs = "INSERT INTO Users (Email, Fname, Lname, UsrPassword, Address, City, Country, Zip, " & _
"CareerLevel, Education, JoinDate, Newsletter, UserType) "
SQLs = SQLs & "VALUES ("
SQLs = SQLs & "'" & strEmail & "',"
SQLs = SQLs & " '" & strFname & "',"
SQLs = SQLs & " '" & strLname & "',"
SQLs = SQLs & " '" & strPassword & "',"
SQLs = SQLs & " '" & strAddress & "',"
SQLs = SQLs & " '" & strCity & "',"
SQLs = SQLs & " " & strCountry & ","
SQLs = SQLs & " '" & strZip & "',"
SQLs = SQLs & " '" & strCareer & "',"
SQLs = SQLs & " '" & strEducation & "',"
SQLs = SQLs & " '" & strJoinDate & "',"
SQLs = SQLs & " '" & strNewsletter & "',"
SQLs = SQLs & " " & strUserType & ")"
'Response.write SQLs
'Response.end
Application.Lock
objConnection.Execute(SQLs)
Application.Unlock
' ## ERROR CONTROL ##
'On Error GoTo 0 ' turn off the ignoring of errors!
' now see if we got any errors from the insert!
For Each oops In objConnection.Errors
If oops.number = -2147217900 Then
'If oops.number = -2147467259 Then
Session("Session_Message") = "The email address you entered already exists. <br />" & _
"<a href=""../forgotpass.asp"">Forgot password? Click here</a>"
Response.Write "That item already exists in that table!<BR>"
'Create the Query String
Dim strQueryString
strQueryString = "?firstname=" & strFname & "&lastname=" & strLname & "&address=" & strAddress & _
"&city=" & strCity & "&zip=" & strZip & "&emailaddress=" & strEmail
Response.Redirect("../candidate/contactinfo.asp" & strQueryString)
Response.End()
Else
Response.Write "Unexpected error: " & oops.number & " -- " & oops.description
Response.End()
End If
'Next
' The following assigns the new UserID to strUserID
Set objRecordset = objConnection.Execute("SELECT @@IDENTITY") ' Create a recordset and_
' SELECT the new Identity
strUserID = objRecordset(0) ' Store the value of the new identity in variable strUserID
Session("User_ID") = objRecordset("UserID")
Session("User_Type") = objRecordset("UserType")
Session("User_Name") = objRecordset("Fname") & " " & objRecordset("Lname")
Session("UserLoggedIn") = true
Session("User_ID") = strUserID
Session("Login_Name") = ""
objConnection.Close
Set objRecordset = Nothing
LoginUser (strUserID)
Session("Session_Message") = "Welcome " & Session("User_Name")
Session("paid") = 0
'Envoyons un courriel/Let's send the email
dim htmlmessage
dim strSiteURL
strSiteURL = "http://www.mywebsiteurl.com/"
htmlmessage = "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.01 Transitional//EN"">"
htmlmessage = htmlmessage & "<html><head><title>"
htmlmessage = htmlmessage & "Nouveau candidat</title>"
htmlmessage = htmlmessage & "<style type=""text/css"">"
htmlmessage = htmlmessage & "<!--"
htmlmessage = htmlmessage & "Body {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px}"
htmlmessage = htmlmessage & "TD {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px}"
htmlmessage = htmlmessage & "-->"
htmlmessage = htmlmessage & "</style>"
htmlmessage = htmlmessage & "<META HTTP-EQUIV=""Content-Type"" Content=""text-html; charset=Windows-1252"">"
htmlmessage = htmlmessage & "</head>"
htmlmessage = htmlmessage & "<body topmargin=""5"" leftmargin=""5"" bgcolor=""#FFFFFF"" text=""#000000"">"
htmlmessage = htmlmessage & "<b>mywebsiteurl.com</b><hr>"
htmlmessage = htmlmessage & "Welcome to mywebsiteurl.com. Your new account is setup.<hr>"
htmlmessage = htmlmessage & "<table width=""50%"" border=""0"" cellspacing=""0"" cellpadding=""1"">"
htmlmessage = htmlmessage & "<tr>"
htmlmessage = htmlmessage & "<td><b>Email Address: </b>" & strEmail &"</td>"
htmlmessage = htmlmessage & "</tr>"
htmlmessage = htmlmessage & "<tr>"
htmlmessage = htmlmessage & "<td><b>Your Password: </b>"& strPassword &"</td>"
htmlmessage = htmlmessage & "</tr></table>"
htmlmessage = htmlmessage & "<P><a href=""http://" & strSiteURL & """>" & strSiteURL & "</a></P>"
htmlmessage = htmlmessage & "</body></html>"
CDOSendEmail2 htmlmessage, strEmail
Response.Redirect("http://mywebsiteurl/checkemail.html")
If Session("UserLoggedIn") = true Then
Response.Redirect("../candidate/default.asp")
End If
Next
Else If action = 2 Then
Dim strSQL
Set objConnection = Server.CreateObject("ADODB.Connection")
Set objRecordset = Server.CreateObject("ADODB.Recordset")
objConnection.Open Application("ConnectionString")
strSQL = "UPDATE Users SET " & _
"Fname = '" & Replace(Request.Form("firstname"), "'", "''") & "', " & _
"Lname = '" & Replace(Request.Form("lastname"), "'", "''") & "', " & _
"Address = '" & Replace(Request.Form("address"), "'", "''") & "', " & _
"City = '" & Replace(Request.Form("city"), "'", "''") & "', " & _
"Zip = '" & Replace(Request.Form("zip"), "'", "''") & "', " & _
"Country = '" & Replace(Request.Form("country"), "'", "''") & "', " & _
"UsrPassword = '" & Replace(Request.Form("password"), "'", "''") & "', " & _
"CareerLevel = '" & Replace(Request.Form("careerlevel"), "'", "''") & "', " & _
"unionaff = '" & Replace(Request.Form("union"), "'", "''") & "', " & _
"malefemale = '" & Replace(Request.Form("malefemale"), "'", "''") & "', " & _
"experience = '" & Replace(Request.Form("experience"), "'", "''") & "', " & _
"NewsLetter = '" & Cint(Request.Form("newsletter")) & "' " & _
"WHERE UserID = " & session("User_ID") & ""
'Response.write strSQL
'Response.end
' Use the execute method of the connection object the insert the record
objConnection.execute(strSQL)
objConnection.close
set objConnection = nothing
' Confirmation message
Session("Session_Message") = Replace(Session("User_Name"), "''", "'") & " your personal information has been updated."
Response.Redirect "../candidate/default.asp"
END IF
Sub LoginUser (strUserID)
Dim objConnection, objRecordset, SQLs
Set objConnection = Server.CreateObject("ADODB.Connection")
Set objRecordset = Server.CreateObject("ADODB.Recordset")
objConnection.Open Application("ConnectionString")
SQLs=""
SQLs= "SELECT UserID, Email, Fname, Lname, UserType FROM Users WHERE UserID = " & strUserID & ""
Set objRecordset=objConnection.Execute(SQLs)
Session("User_ID") = objRecordset("UserID")
Session("User_Type") = objRecordset("UserType")
Session("User_Name") = Replace(objRecordset("Fname"), "''", "'") & " " & Replace(objRecordset("Lname"), "''", "'")
Session("Login_Name") = objRecordset("Email")
Session("UserLoggedIn") = true
objConnection.Close
Set objRecordset = Nothing
End Sub
Sub CDOSendEmail2(MessageBody, SendTo)
Dim NewMail, objConfig, bSuccess, strErr
bSuccess = False
Set NewMail = Server.CreateObject("CDO.Message")
Set objConfig = Server.CreateObject("CDO.Configuration")
Const cdoSendUsingMethod = "http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSMTPServer = "http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPServerPort = "http://schemas.microsoft.com/cdo/configuration/smtpserverport"
Const cdoSMTPAuthenticate = "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
Const cdoSendUsingPort = 2 'Must use this to use Delivery Notification
Const cdoAnonymous = 0
Const cdoBasic = 1 ' clear text
dim strMailServer
dim strMailServerPort
dim strFromEmail
strMailServer = "relay-hosting.secureserver.net"
strMailServerPort = 25
strFromEmail = "info@mywebsiteurl.com"
'Configuration:
objConfig.Fields(cdoSendUsingMethod) = cdoSendUsingPort
objConfig.Fields(cdoSMTPServer) = strMailServer ' value from DB
objConfig.Fields(cdoSMTPServerPort) = strMailServerPort
objConfig.Fields(cdoSMTPAuthenticate) = cdoAnonymous
'Update configuration
objConfig.Fields.Update
Set NewMail.Configuration = objConfig
NewMail.To = "<" & SendTo & ">" ' value passed from Form
NewMail.From = strFromEmail ' value of From Admin of site from DB
NewMail.Subject = strSubject
NewMail.HTMLBody = MessageBody
On Error Resume Next ' catch errors
NewMail.Send
If Err <> 0 Then ' error occurred
strErr = Err.Description
else
bSuccess = True
End If
if bSuccess = False Then
Response.Write("Error sending mail to " + SendTo + ", message: " + strErr)
Session("Session_Message") = Session("Session_Message") + "<br /> Error sending mail to " + SendTo + ", message: " + strErr + "<br />"
end if
Set NewMail = Nothing
Set objConfig = Nothing
End Sub
End if
%>
La patience est 50% d'un projet web réussi!
|
|
|
|
|
I'm not sure this post fits this board, but ... =\
I'm writting a page that calls a webservice through javascript and, now, I'm getting an error from ScriptResource.axd. I have even tryed rewritting the code causing the problem, but the error is the same.
Error: i is not a function
Line: 5
JS Code
function apagar_utlz_m(id)
{
var tabela = document.getElementById(id);
var tbody = tabela.getElementsByTagName('tbody')[0];
var linhas = tbody.getElementsByTagName('tr');
var j, checked, codigo_nome, ano_pass, obj;
for (j=0 ; j<linhas.length ; j++)
{
obj = linhas[j];
checked = obj.childNodes[0].childNodes[0].checked;
codigo_nome = obj.childNodes[1].childNodes[0].value;
ano_pass = obj.childNodes[2].childNodes[0].value;
if (checked)
{
function Sucesso(r)
{
if (!r) alert('Erro: não foi possível apagar a entrada');
else
{
if (id == 'utilizadores') selectUtilizadores();
else selectM();
}
}
if (id == 'utilizadores') cnc.servidor.deleteUtilizador(codigo_nome, ano_pass, Sucesso, ErroChamada);
else cnc.servidor.deleteM(codigo_nome, ano_pass, Sucesso, ErroChamada);
}
}
}
The WebService methods "deleteUtilizador" and "deleteM" are both called (changes are made to the DB!), but "Sucesso" never runs, so I'm assuming the problem is related to this call.
Can anybody help?
Best regards
Fratelli
|
|
|
|
|
On right clicking on a web Site we get the Option of "Add Reference".If we add some assembly by "Add Reference Diaologue Box", some times the Assembly goes to Web.Config file and some times into the Bin folder.
I am not clear-which assembly go to Config file and which go to Bin Folder.
Dear friend, please help me on this.
|
|
|
|
|
I suspect the difference is that some libraries are already present with an installation of .NET and so can be referenced in the config file.
ASP.NET questions are better asked in the ASP.NET forum.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hello, Vikash Here.
I have a USB device. To use this device, the manufacturer has provided a .OCX file.
So in windows app, I register my OCX and I can see a control in the ToolBox which I drop on a Form and use the USB device using this Control.
Now this Control works on Events .This USB device is a FingerPrint Reader.
When I place my Finger on the Reader it generates an Event which is Captured by my Windows App(bcoz of OCX Control on the Form) and I get the FingerPrint Data.
Now How Can I Achieve this in VBScript in my Web-Page.
Hope you understand my explaination.
Any Ideas.
|
|
|
|
|
Vikash, were you successful in doing this?
If so please let me know how you did this because I am also facing the same problem.
|
|
|
|
|
hi,
i have dynamic gridtable, in that i have lookup window, i will select the data from the lookup window, even i want to find the data and i have to update the new data, how to do it in lookup window.
please help me.
modified on Thursday, October 8, 2009 6:22 AM
|
|
|
|
|
I can't really follow what you're asking, but either way, yuor starting point needs to be to tell us what you're using, as this is not the ASP.NET forum, I assume it's ASP or PHP, maybe JSP ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I want to place captcha image on HTML page by using ASP code not ASP.net code.i dont want to make my html page as aspx so i need asp code for that.
can anybody help....
thanks in advance
|
|
|
|
|
|
He is not aksing for ASP.NET Captcha Control !! He is asking for ASP !!!
|
|
|
|
|
I overlook this..
|
|
|
|
|
I m asking for ASP i already have asp.net code but i need asp which i can run on my html page....
|
|
|
|
|
its urgent... i have searched a hell lot
|
|
|
|
|
Placing 'urgent' and similar keywords is a sure way too discourage experts from assisting you.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|