PLEASE HELP
I am "TRYING"
to use following code to store records to written in a table
Goal
Store SQL qury in an array and execute it after seecific no. of records
As a 1st part I am tring to record the SQL statements in an array
MY problem is I cannot store it in an array.
Each time I found the array count = 1 ( after submit)
Please help me to store the details in an array
Thanks in advace ..........
The code is listed below
<?php
include("config.inc");
ob_start();
$arnm=array();
$sql_link=mysql_connect($HOST, $DBUSER, $DBPASSWD) ;
if ($sql_link == true)
{
print "connection done ";
}
else
{
print "Connection Failed <br>";
}
$link=mysql_select_db($datadb, $sql_link);
$dtinsert= gmdate("d-m-Y");
echo $dtinsert;
function storequery()
{
echo "function store query<br>";
global $arnm;
$arnm[]= $querymaxid;
echo count($arnm);
}
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="75%" border="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td height="5">
<?
if (isset($Submit))
{
$resultquery = mysql_db_query("MRBS",$queryinsert);
storequery();
}
?>
</td>
</tr>
<tr>
<td><form name="form1" method="post" action="">
<table width="99%" border="0" cellspacing="1">
<tr>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> </td>
<td> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF">Area NAme</td>
<td bgcolor="#FFFFFF"> <input type="text" name="areaname"></td>
<td> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> <input type="submit" name="Submit" value="Submit"></td>
<td> </td>
</tr>
</table>
</form></td>
</tr>
<tr>
<td height="4"> </td>
</tr>
</table>
</body>
</html>