Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~457 People Reached
Favorite Forums
Favorite Tags
php x 5
Member Avatar for ken.atienza

I use the Select form to update the orderstatus field from the table. [CODE]<?php session_start(); if($_SESSION['usertype'] !== 'admin') { header("location:index.php?page=loginpage.php"); } include('includes/ordercontrolbuttons.php'); include('includes/connect.php'); mysql_select_db("al",$con); $result = mysql_query("SELECT * FROM orders"); echo "<form action='orderstatusadmin.php' method='post'>"; echo "<table border=1 cellspacing=0 cellpadding=5 class='orderlist'>"; echo "<tr><th>Order Number</th>"; echo "<th>Name</td>"; echo "<th>Order Detail</th>"; echo "<th>Order …

Member Avatar for mathieu89
0
135
Member Avatar for ken.atienza

I use the top table as a cart for 1 customer, and the bottom table for order. I wanted to get the productprice, productname, productqty and put it into orderdetail field. Help and suggestions are very much appreciated. Thanks in advance. *attached a pic of the tables.

Member Avatar for foreshadowed
0
72
Member Avatar for ken.atienza

$user['username'] = name of the table producttotal 500 6105 131 [CODE]$ordertotal = mysql_query("SELECT SUM(producttotal) FROM ".$user['username'].""); echo "Order total: ".$ordertotal;[/CODE] why is the result "Order total: Resource id #7". I wanted to sum all the values below producttotal column. Thanks in advance.

Member Avatar for sun-tzu
0
98
Member Avatar for ken.atienza

[CODE]$sql="SELECT * FROM accounts,adminaccount WHERE accounts.emailaddress='$username' and accounts.password='$password' or adminaccount.emailaddress='$username' and adminaccount.password='$password'"; $result = mysql_query($sql); $count=mysql_num_rows($result); $row = mysql_fetch_assoc($result); $usertype = $row['usertype']; if($count==1) { $_SESSION['usertype']= $row['usertype']; $_SESSION['id'] = $row['id']; if($usertype == "admin") { header("location:indexadmin.php"); } else { header("location:indexmember.php"); } } else { header("location:index.php?page=loginfail.php"); } ?> [/CODE] I wanted it to …

Member Avatar for Matthew N.
0
152