Hello All,
I would like to create new users in PhpMyadmin and grant them some priviliges as in only Insert query for one user and count() for the other etc.
I want to create a number of users. No issues with that.
Can anyone help me regarding the same???
Thanks & Regards,
Dream2rule
Create Users in MySQL
Moderator: General Moderators
- iknownothing
- Forum Contributor
- Posts: 337
- Joined: Sun Dec 17, 2006 11:53 pm
- Location: Sunshine Coast, Australia
-
dream2rule
- Forum Contributor
- Posts: 109
- Joined: Wed Jun 13, 2007 5:07 am
Yeah did the same, displayed the list of priviliges along with the checkboxes.
But i am stuck in retrieving the checked box info.
Here's the code:
How do i retrieve the checked box values?
and also if i give a while loop instead of a for loop, its going in the infinite loop. can i know why?
Regards
But i am stuck in retrieving the checked box info.
Here's the code:
Code: Select all
$priviliges = array("select_priv","insert_priv","update_priv","delete_priv","create_priv","drop_priv","reload_priv", "shutdown_priv","process_priv","file_priv","grant_priv","references_priv","index_priv",
"alter_priv");
echo "<table border=0 cellpadding=0 cellspacing=0 align=center width='100%' border='1'>";
$count = count($priviliges)."<br>";
//echo $count;
for($i = 0; $i < $count; $i++ )
{
if($i == 0)
echo "<tr>";
echo "<td align=left><input type=checkbox name=$priviliges[$i]>$priviliges[$i]</td>";
echo "</tr>";
}
echo "</table>";and also if i give a while loop instead of a for loop, its going in the infinite loop. can i know why?
Regards