Jump to content

shaneR

Members
  • Posts

    20
  • Joined

  • Last visited

About shaneR

  • Birthday 08/12/1975

Profile Information

  • Location
    warwickshire, England

shaneR's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Thankyou after taking your comments into consideration im now able to perform the delete from both the server and database.Regards,Shane
  2. Hi everyone! my database site is now uploading files to my server and at the same time writting this file name and the users id to my database. What i need to do now is allow the user to access their own content and be able to delete this from the server and database.I have already been trying a few different methods but i just cant seem to get my head around it.Any code or advice would be appreciated, Thanks
  3. shaneR

    track uploads?

    Yes im using a form connected to an asp page. I have not included any cookies or sessions that im aware of so that sounds like the way to go? Thanks
  4. shaneR

    track uploads?

    I have created the user log in details in a database and these details are checked when they log into my page that allows them to then upload direct to my server. I now need a way of identifying the files uploaded by the different user in order to call them back into my database for users to view etc.I hope this makes a little more sense, thankyou.
  5. shaneR

    track uploads?

    My database is now working fine! thanks to all. However i have now set it up so that users can log in and upload files to my server. How can i automatically have a copy of their file names sent to my database perhaps with their user log on id also?I would appreciate some code if possible (iam currently using dreamweaver to write my pages)Thankyou...
  6. Thanks for all that have taken the tome to look at this problem. I have discovered what was the cause and as usual it is something very simple.Basically one of my field names is called PASSWORD and as this is whats known as a reserved word i have changed it and now the site works.
  7. Hi, i wonder if anybody would be as kind to take a look at the attached code. Im trying to set up a form which when submitted the required information is sent to my database.The error which is displaying is as follows:Microsoft JET Database Engine error '80040e14'Syntax error in INSERT INTO statement./Shane_R/my_music_profile/web_site_construction/www/upload.asp, line 115 Thankyou..... <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%><!--#include file="../Connections/con1.asp" --><%' *** Edit Operations: declare variablesDim MM_editActionDim MM_abortEditDim MM_editQueryDim MM_editCmdDim MM_editConnectionDim MM_editTableDim MM_editRedirectUrlDim MM_editColumnDim MM_recordIdDim MM_fieldsStrDim MM_columnsStrDim MM_fieldsDim MM_columnsDim MM_typeArrayDim MM_formValDim MM_delimDim MM_altValDim MM_emptyValDim MM_iMM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)End If' boolean to abort record editMM_abortEdit = false' query string to executeMM_editQuery = ""%><%' *** Insert Record: set variablesIf (CStr(Request("MM_insert")) = "form1") Then MM_editConnection = MM_con1_STRING MM_editTable = "register" MM_editRedirectUrl = "upload.asp" MM_fieldsStr = "Email|value|Prefferedmusictype|value|Password|value|Profilename|value" MM_columnsStr = "Email|',none,''|Prefferedmusictype|',none,''|Password|',none,''|Profilename|',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 IfEnd If%><%' *** Insert Record: construct a sql insert statement and execute itDim MM_tableValuesDim MM_dbValuesIf (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 IfEnd If%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body><form method="post" action="<%=MM_editAction%>" name="form1"> <table align="center"> <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">Prefferedmusictype:</td> <td> <input type="text" name="Prefferedmusictype" value="" size="32"> </td> </tr> <tr valign="baseline"> <td nowrap align="right">Password:</td> <td> <input type="text" name="Password" value="" size="32"> </td> </tr> <tr valign="baseline"> <td nowrap align="right">Profilename:</td> <td> <input type="text" name="Profilename" value="" size="32"> </td> </tr> <tr valign="baseline"> <td nowrap align="right"> </td> <td> <input type="submit" value="Insert record"> </td> </tr> </table> <input type="hidden" name="MM_insert" value="form1"></form><p> </p></body></html>
  8. Thankyou, just tried that and i have resized all my pages to 101% and they all now align without any jumping... Regards Shane.
  9. I have been building a website using html and css and the entire site has been constructed within a table and centre aligned. this works perfectly for the pages that do not have default scroll bars on them.Basically all my page width are the same size but the pages that are longer than the browsers can fit (height) a scroll bar is automatically added to the right hand side of the browser and this then causes the site to take the width of the scroll bar into account when centering the page and hence moves theses pages out of line with the ones without scroll bars.Does anybody have any suggestions please on how this can be rectified?Thankyou.
  10. shaneR

    positioning in css

    Could someone please describe the differences between RELATIVE and ABSOLUTE when positioning using css and maybe how to use the two together. Thanks
  11. i'm currently writting a website using HTML and have a page which requires quite a lot of scrolling to reach the bottom. Could somebody please offer me some simple code to create a link at the top of the page which when clicked will jump to the bottom.THANKYOU....
  12. shaneR

    search boxes

    Thankyou, i shall visit this site over the weekend.
  13. shaneR

    search boxes

    I invite people to give there suggestions on the best way of building a site search box. The function of which is to enable site visitors to search the site their on and not the web. thankyou
×
×
  • Create New...