PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have a script which shows customer info. This window is empty. What I want to do is select a customer ID in a new window and then refresh the main window with the customer ID.
I have taken a stab at embeding some javascript in my PHP script, but it does not work. Can anyone point me in the right direction. Please bear in mind I have little javascript experience. Find the code for the child window:
in the pop up window
make a temp cookie or something that holds the info
then have a include with the meta tag,
i think when u include it, with a meta tag, it will update just that part
in theory...
anyways, have it search for the cookie each time, after its found, have it print it or what ever...
if not found, use a or else statment, so that it does not print a error...
$query = "select * from customer where cust_name like '%$company%' ";
$queryResult = mysql_query($query);
$i=0;
while($row=mysql_Fetch_array($queryResult))
{
// if $i%2 is 0, the number is even, otherwise it will be odd.
$bgcolor=($i%2==0)?"#cccccc":"#ffcc99";
print "<tr>";
print "<td>";
print "<td bgcolor="$bgcolor">{$rowї'cust_id']}</td>";
print "<td bgcolor="$bgcolor"><a href="customeradmin.php?cust_id={$rowї'cust_id']};" TARGET="customeradmin">{$rowї'cust_name']}</a></td>";
print "<td bgcolor="$bgcolor">{$rowї'postcode']}</td>";
print "<td bgcolor="$bgcolor">{$rowї'cust_phone']}</td>";
print "</tr>";
$i++;
}
?>