E ovako, na netu sam nasao neku skriptu za Adresar. Kada je pokrenem prijavljuje mi neke greske, da li neko zna u cemu je problem?
Uspod su prvo fajlovi ove skripte, a ispod njih su greske koje se javljaju....
------------------------------------------------------------------------------------------------------
INDEX.PHP
--------------------------------------------------------------------------------
<html>
<head>
<LINK href="css.css" type=text/css rel=stylesheet>
<meta http-equiv="Content-Language" content="hr">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Adresar</title>
<script type="text/javascript" language="JavaScript1.2" src="javascript/stm31.js"></script>
<SCRIPT language=JavaScript src="Adresar_files/time.js"
type=text/javascript></SCRIPT>
</head>
<body>
<div align="left">
<table width="352" height="30" bgcolor="#E0E8EB">
<tr>
<td width="183" height="30" valign="top"><b><font face="Comic Sans MS" size="6" color="#C0C0C0">ADRESAR</font></b></td>
<td width="347" height="30" valign="bottom"><b><font face="Comic Sans MS" size="2" color="#C0C0C0">
<SCRIPT language=JavaScript type=text/javascript>
<!--
ispisiDatumHr();
//-->
</SCRIPT>
</font></b></td>
</tr>
</table>
</div>
<table width="750" bgcolor="#C0C0C0" >
<tr>
<td width="22%">
<p align="center"><font size="2"><b> <font face="Comic Sans MS">UNESITE U BAZU</font></b></font></p>
</td>
<td width="178%">
<p align="center"><font face="Comic Sans MS" size="2"><b>PREGLED CIJELE BAZE</b></font></p>
</td>
</tr>
</table>
<table width="16%" height="220" bgcolor="#E0E8EB" align="left">
<tr>
<td width="24%" height="214">
<p align="center">
<form action="index.php" method="post">
Ime i prezime:
<input type="text" name="ImePrime">
<br>
Nick:
<input type="text" name="Nick">
<br>
E-mail:
<input type="text" name="Email">
<br>
Telefon:
<input type="text" name="Telefon">
<br>
Mobitel:
<input type="text" name="Mobitel">
<br>
Adresa:
<input type="text" name="Adresa">
<br>
<input name="Submit" type="Submit" value="Upiši">
<p> </td>
</tr>
</table>
<?PHP
$polj1 = $_POST['ImePrime'];
$polj2 = $_POST['Nick'];
$polj3 = $_POST['Email'];
$polj4 = $_POST['Telefon'];
$polj5 = $_POST['Mobitel'];
$polj6 = $_POST['Adresa'];
if ($polj1=="" || $polj2=="" ||$polj3=="" ||$polj4=="" || $polj5=="" ||$polj6=="")
{echo "Ukoliko pišete u bazu molim vas popunite sva polja!!!";}
else
{
$konekcija= mysql_connect("","","") or die("Nije se moguce spojiti na server!!!");
mysql_select_db("Adresar") or die("Nije moguce koristiti ovu bazu!!!");
$reuzultat=mysql_query("INSERT INTO podaci VALUES ('','$polj1','$polj2', '$polj3','$polj4','$polj5','$polj6')");
mysql_close($konekcija);
}
$a = mysql_connect("","","");
mysql_select_db("Adresar");
echo " <center><table align='left' bgcolor='gray' ><tr>";
echo "<p align='center'>
<td valign='top' width='95' align='center' bgcolor='#C0C0C0'>Ime i prezime
<td valign='top' width='95' align='center' bgcolor='#C0C0C0'>Nick
<td valign='top' width='95' align='center' bgcolor='#C0C0C0'>Email
<td valign='top' width='95' align='center' bgcolor='#C0C0C0'>Telefon
<td valign='top' width='95' align='center' bgcolor='#C0C0C0'>Mobitel
<td valign='top' width='95' align='center' bgcolor='#C0C0C0'>Adresa ";
echo "</tr>";
$b = mysql_query("SELECT * FROM podaci");
for ($i = 0; $i < mysql_num_rows($b); $i++)
{
$row = mysql_fetch_array($b);
echo "<tr>";
echo "<p align='center'>";
echo "<td align='center' bgcolor='#D2D5D5'><font size='2'>" . $row['imeprime'] . "</font></td>";
echo "<td align='center' bgcolor='#D2D5D5'><font size='2'>" . $row['nick'] . "<font></td>";
echo "<td align='center' bgcolor='#D2D5D5'><font size='2'><a href='mailto:'" . $row['email'] .">" . $row['email'] . "</a></font></td>";
echo "<td align='center' bgcolor='#D2D5D5'><font size='2'>" . $row['telefon'] . "</font></td>";
echo "<td align='center' bgcolor='#D2D5D5'><font size='2'>" . $row['mobitel'] . "</font></td>";
echo "<td align='center' bgcolor='#D2D5D5'><font size='2'>" . $row['adresa'] . "</font></td>";
echo "</tr>";
}
mysql_free_result($b);
mysql_close($a);
?>
</table>
</center>
</body>
</html>
------------------------------------------------------------------------------
------------------------------------------------------time.js(Adresar_files/time.js)---------------------------------------
<!--
function kreirajDatum(){
danas = new Date();
with(danas){
dan = getDay();
datum = getDate();
mjesec =getMonth();
godina = getFullYear();
return (dan, datum, mjesec, godina);
}
}
function ispisiDatumHr(){
dne = ["Nedjelja","Ponedjeljak", "Utorak", "Srijeda", "Èetvrtak", "Petak", "Subota"];
mj = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"];
kreirajDatum();
document.write(dne[dan] + ", " + datum + "." + mj[mjesec] + "." + godina + ".")
}
//-->
------------------------------------------------------------------------------------------------------------------------
A ovo su greske:
---------------------
Notice: Undefined index: ImePrime in c:\program files\easyphp1-8\www\adresar\index.php on line 71
Notice: Undefined index: Nick in c:\program files\easyphp1-8\www\adresar\index.php on line 72
Notice: Undefined index: Email in c:\program files\easyphp1-8\www\adresar\index.php on line 73
Notice: Undefined index: Telefon in c:\program files\easyphp1-8\www\adresar\index.php on line 74
Notice: Undefined index: Mobitel in c:\program files\easyphp1-8\www\adresar\index.php on line 75
Notice: Undefined index: Adresa in c:\program files\easyphp1-8\www\adresar\index.php on line 76
Ukoliko pišete u bazu molim vas popunite sva polja!!!
Warning: mysql_connect(): Unknown MySQL Server Host 'Adresar' (11001) in c:\program files\easyphp1-8\www\adresar\index.php on line 92
Warning: mysql_select_db(): Access denied for user 'ODBC'@'localhost' (using password: NO) in c:\program files\easyphp1-8\www\adresar\index.php on line 93
Warning: mysql_select_db(): A link to the server could not be established in c:\program files\easyphp1-8\www\adresar\index.php on line 93
Warning: mysql_query(): Access denied for user 'ODBC'@'localhost' (using password: NO) in c:\program files\easyphp1-8\www\adresar\index.php on line 106
Warning: mysql_query(): A link to the server could not be established in c:\program files\easyphp1-8\www\adresar\index.php on line 106
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in c:\program files\easyphp1-8\www\adresar\index.php on line 108
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in c:\program files\easyphp1-8\www\adresar\index.php on line 125
Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in c:\program files\easyphp1-8\www\adresar\index.php on line 127
----------------------------
Pozdrav.....
Tihomir Malesevic
|