ugrás a tartalomhoz

Archívum - Már 1, 2006 - Fórum téma

PHP vs MYSQL

Petrusz · 2006. Már. 1. (Sze), 01.29
Szeretném ismételten a segítségeteket kérni,
van egy egy táblás adatbázisom (test)
adatbázis neve Accounts
tábla neve Acc

egy form ról átküldök 2 adatot a feldolgozó php-nak de lefagy
Parse error: parse error in c:\easyphp1-8\www\insert_account.php on line 2

Ha valaki tud tanácsot adni, megköszönöm :)

Péter

HTML:

<html>
<head>
	<title>Accounts</title>
</head>

<body>
<h1>Accounts / New Account Entry</h1>
<form action="insert_account.php" method="post">
<table border=10>
<tr>
<td>Számla</td>
<td><input type="number" name="szamla" maxlength=6 size=13><br></td>
</tr>
<tr>
<td>Megnevezés</td>
<td><input type="text" name="megnev" maxlength=10 size=13><br></td>
</tr>
<tr>
<td><input type="submit" value="Register"></td>
</tr>
</table>
</form>

</body>
</html>
A PHP:

<?php
mysql_connect("localhost","root"."") or die ("could not connect to localhost");
mysql_select_db("accounts") or die ("could not be select database");
$query="insert into acc("$szamla","$megnev")";
$result=mysql_query($query);
mysql_query($query);
if($result)
echo mysql_affected_rows()."account insert into database.";
?>