Jump to content

Jerome

Members
  • Posts

    94
  • Joined

  • Last visited

Posts posted by Jerome

  1. Hi Siva,You should create a .txt file called, for e.g., counter.txt and place it in the adequate root directory. In this file you only should write the number zero (0). Then use this code to increase the number contained in the file :

    ' Here you just open the conter.txt file and read the number... Set FS=Server.CreateObject("Scripting.FileSystemObject")Set RS=FS.OpenTextFile(Server.MapPath("counter.txt"), 1, False)fcount=RS.ReadLineRS.Close' You increase the number...fcount=fcount+1' You insert the new number in your conter.txt file ...Set RS=FS.OpenTextFile(Server.MapPath("counter.txt"), 2, False)RS.Write fcountRS.CloseSet RS=NothingSet FS=Nothing

    You can also use some cookies or a session object to prevent a user to increase your counter more than once on the same day.This helps? :)

  2. The syntax you are using is not corret. To save you some "typing work" you can use :

    INSERT INTO pradyumna(field1,field2,field3) SELECT 'pk','2000','india'UNION ALLSELECT 'sk','12000','USA'

  3. Hi, here you have an image contained into a cell that will change every hour, you would need 24 fotos to use it.What is the time period you need?

    <%@ Language=VBScript %><%Dim timeHour, imageCelltime = hour(now)Select Case timeHour	Case 0  imageCell = "image_0.gif"	Case 1  imageCell = "image_1.gif"	Case 2  imageCell = "image_2.gif"	'...	Case 23  imageCell = "image_23.gif"End Select%><html><body><table border>	<tr>  <td background="<%=imageCell%>"></td>	</tr></body></table></html>

  4. One day, I tried to change the complete aspect of a combo box and I found out that it was not possible unless you create your own combo box object...I think it's the same problem with the radio buttons, you can change some global properties and that's all... but I'm not an expert in CSS...

  5. Hi Denis,You should have a comments table with those fields : nick, comment, newsID, time"Donald", "This is a comment",123, "10/11/2005"Where newsID contains the id of the news related to one comment in particular.So, at the time a user inserts a comment, you should also insert the id of the news that he is commenting.

    sql="INSERT INTO comments (nick, comment, newsID)"sql=sql & " VALUES "sql=sql & "('" & Request.Form("nick") & "',"sql=sql & "'" & Request.Form("comment") & "'," & newsID & "');"

    Now when you display the comments, you can use the id of one particular news to make a selection in your comments table :

    dataSQL = "SELECT nick, comment, newsID, time FROM comments WHERE newsID = ID"

    What is the url of your site?

×
×
  • Create New...