Jump to content

tjodalv

Members
  • Posts

    23
  • Joined

  • Last visited

Posts posted by tjodalv

  1. Or you can use cookie instead.So you will have<%Dim strName, strLastNamestrName = Request.QueryString("fname")strLastName = Request.QueryString("lname")Response.Cookies("mycookie")("first_name") = strNameResponse.Cookies("mycookie")("last_name") = strLastNameResponse.Write "Hello " & Request.Cookies("mycookie")("last_name") & ", " & Request.Cookies("mycookie")("first_name")%>

  2. Subscript out of range usually means you tried to access an element of an array that was either greater than its ubound or lower than its lbound. For example:

    <% 	dim foo(1) 	response.write foo(2) %>

  3. You probably want to have row color and alternate row color. You can do it this way:

    color = "#FFFFFF"Do While NOT rs.EOF...If color = "FFFFFF" Then   color = "#F1F1F1"Else   color = "#FFFFFF"End ifrs.MoveNext()Loop

    If you are in a For - Next loop the principle is the same ...

  4. HelloI have app that has categories and subcategories and products. My app can have unlimited categories and subcategories and subcategories can go in unlimited deep.Structure of my table that holds categories and subcategories is:id - autonumber (category ID)parentID - number (holds the ID of parent categorie)name - txt (category name)Structure of table that holds productsid - autonumber (product ID)catID - number (category ID)name - txt (product name)Now if I have category Memory, and it's parent category Components. I want to, when is selected category Components, display all products that is in Component category and all products that is in child category.Tnx

  5. The difference between HTML 4.0 and XHTML is very small, actualy XHTML is new version of HTML. HTML is markup language that 'says' browser how to display a webpage. XML is something different. XML is used for storing data. On w3schools.com is explained what is the main difference:XML was designed to describe data and to focus on what data is.HTML was designed to display data and to focus on how data looks.You can start learning HTML today. All you need is a good will, notepad and web browser :) HTML is very easy to learn, and you can learn it in 24 hours.

  6. Look, this is a project for now. There is no quality ASP forums on the market and this is why I think there is a chance to make good product. WebWiz Forums is good, but some things are made very sloppy. If you are interested you can suggest things. This is OUR project, not my.

  7. HelloI have an idea of create ASP bulletin board. I am an Tjodalv Bjornen, ASP programmer and I am looking for programmers to work with me on the project. If you are interested contact me at bjornen@net.hr for details.Currently I need web designer and ASP programer. Whole project is going to be commercial, so you can expect some profit.Tjodalv Bjornenbjornen@net.hr

  8. Dim doing, msgdoing = Request.QueryString("do")If doing = "edit" Then	u_ime = Request.Form("ime")	u_email = Request.Form("email")	u_lozinka = Request.Form("lozinka")	u_adresa = Request.Form("adresa")	u_zip = Request.Form("zip")	u_grad = Request.Form("grad")	u_telefon = Request.Form("telefon")	u_mobitel = Request.Form("mobitel")			If u_ime = "" OR u_email = "" Then			msg = "Required fields !"				If u_telefon = "" AND u_mobitel = "" Then					msg = "Required fields"				Else						If u_lozinka = "" Then								strSQL = "UPDATE tblKorisnici SET [ime] = '" & u_ime & "', [email] = '" & u_email & "', adresa = '" & u_adresa & "', [zip] = " & u_zip & ", grad = '" & u_grad & "', telefon = '" & u_telefon & "', mob = '" & u_mobitel & "' WHERE id = " & Request.Cookies("enekretnine")("user_id") & ";"				  dbConn.Execute(strSQL)				  msg = "Succses !"							Else								strSQL = "UPDATE tblKorisnici SET [ime] = '" & u_ime & "', [email] = '" & u_email & "', lozinka = '" & u_lozinka & "', adresa = '" & u_adresa & "', [zip] = " & u_zip & ", grad = '" & u_grad & "', telefon = '" & u_telefon & "', mob = '" & u_mobitel & "' WHERE id = " & Request.Cookies("enekretnine")("user_id") & ";"				  dbConn.Execute(strSQL)				  msg = "Succes !"							End if					End if			End ifElse	Set rsGetUserData = Server.CreateObject("ADODB.Recordset")	strSQL = "SELECT * FROM tblKorisnici WHERE id = " & Request.Cookies("enekretnine")("user_id") & ";"	rsGetUserData.Open strSQL, dbConn			If rsGetUserData.EOF Then		Response.Redirect "default.asp"	Else		ime = rsGetUserData("ime")		email = rsGetUserData("email")		adresa = rsGetUserData("adresa")		zip = rsGetUserData("zip")		grad = rsGetUserData("grad")		telefon = rsGetUserData("telefon")		mob = rsGetUserData("mob")	End ifEnd if

    Why that code is not working. Why my database table wont update. I get no error, but my table fileds remain the same. Pls help

  9. I have database table tblImg that have fields:idnidthumbnailpictureThis is my code that is not working

    Set rsImg = Server.CreateObject("ADODB.Recordset")strSQL = "SELECT MIN(id) FROM tblImg WHERE nid = " & myNID & ";"rsImg.Open strSQL, dbConnIf rsImg.EOF = "" Then   imgThumb = "nopic.gif"Else   imgID = rsImg(0)   Set rsMyImg = Server.CreateObject("ADODB.Recordset")   strSQL = "SELECT * FROM tblImg WHERE id = " & imgID & ";"   rsMyImg.Open strSQL, dbConn							   If NOT rsMyImg.EOF Then	  imgThumb = rsMyImg("thumbnail")   End ifEnd ifSet rsImg = NothingSet rsMyImg = Nothing

    I get an error:Microsoft JET Database Engine (0x80040E14)Syntax error (missing operator) in query expression 'id ='.Line:strSQL = "SELECT * FROM tblImg WHERE id = " & imgID & ";"<edit>I've found a problem. The problem was at the line:If rsImg.EOF = "" ThenI've triedIf IsNull(rsImg(0)) Thenand that is working.</edit>

  10. You have to send two querystring parametars, sort and table name.Your link have to be like this:<a href="haha3.asp?sort=dategiven&tblname=1E1">Link</a>and then when constructing SQL statement your sql statemant should look like this:sort = Request.QueryString("sort")tblname = Request.QueryString("tblname")strSQL = "SELECT * FROM '" & tblname & "' & ORDER BY '" & sort & "';"

  11. I am ASP programmer but try this:echo "<a href=\"viewreview.php?id=$row['id']\">$row['title']</a>";That should work. I assume that you have id field in database.

  12. Error is in that 15 line. Because he use variable pwd in his SQL command, and value of password field is stored in variable pass.Right SQL statement would be:sql= "SELECT * FROM samer WHERE (name ='" & uname & "') AND (pass ='" & pass & "')"

×
×
  • Create New...