The names of the fields in the DB (gjest) is:
id-integer autoincrement
navn Varchar(35)
hjemmeside Varchar(35)
tid Varchar(35)
melding (text)
The connection works on another page, so it should be working here as well
<?php
include ("conn.php");
//this is the statement to get all the info
$sql = mysql_query("SELECT * FROM gjest");
// go through each row in the result set and display data from the table
while ($row = mysql_fetch_array($sql)) {
// give a name to the fields i.e. $row['name of column in...
<?php
include ("conn.php");
//this is the statement to get all the info
$sql = mysql_query("SELECT * FROM gjest");
// go through each row in the result set and display data from the table
while ($row = mysql_fetch_array($sql)) {
// give a name to the fields i.e. $row['name of column in...
Thank you, but no, It doesent help me.. I still get the same error-message:[i]
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource [i]
Now I've tried to echo them, but it still doesnt work...
Ok,thank you, I tried, still the same message.
Her is the sql i get :
INSERT INTO gjest(navn, hjemmeside, tid, melding) values(dsf, fdsf, Mon Jan 31, asf)
This looks allright dont it?
All the rights are set for the user who inserts into the DB
it is meant to count the numbers allowed in the databasefield. (lengde=length)
Just to assure you, i have opened the database rs with this code:
<%
option explicit
Dim rs, Conn, Kurskode, Kursnavn, Klassetrinn, Rom, Periode, Valgfag, sql, sql2, rs3
response.buffer = false
Set Conn =...
<%
If Request.QueryString ("knapp") = "ny" then 'administrator vil legge inn nytt kurs
sql2="select * from Kurs"
response.write sql2
rs3.open sql2, Conn, 3, 3
rs3.Addnew
lengde= RS3("Kurskode").DefineSite
verdi=request.queryString("Knr")
if len (verdi)>lengde then
RS3("Kurskode")=left...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.