Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
4
Posts with Upvotes
4
Upvoting Members
4
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
Ranked #2K
~3K People Reached
About Me

PHP developer with an interest in NoSQL datastores

Favorite Forums
Favorite Tags

12 Posted Topics

Member Avatar for Eagle.Avik

There's a few things going on within your code that needs to be addressed. But let's first cover why you're having the log in problem. You've assigned the variable `$data` to the returned result of the `count()` function. The result will be an integer, not an associative array as you …

Member Avatar for Eagle.Avik
0
269
Member Avatar for rhodoscoder

Just as a further addition to the improvements said above, you may want to use either the `mysqli_fetch_assoc()` function, or specify the second argument to the `mysqli_fetch_array()` function as **MYSQLI_ASSOC**. The reason being is that currently the result being set fetched is returning both an associative and numerically indexed array …

Member Avatar for tpunt
0
161
Member Avatar for fheppell

Why not use the [array_reverse()](http://php.net/manual/en/function.array-reverse.php) function upon the array first, and then iterate through the reversed array elements afterwards with your `while` loop?

Member Avatar for pritaeas
0
126
Member Avatar for chrisschristou

You've forgotten to put `$_SESSION` in front of `['MM_Username']` within your query, and you have not encased the value within quotes. This should fix it: $query_order = "SELECT * FROM commande WHERE client = '{$_SESSION['MM_Username']}' ORDER BY commande.`date` DESC";

Member Avatar for chrisschristou
0
105
Member Avatar for leokuz

Just to add onto what *broj1* has said above, you should also be hashing the passwords instead of inserting them as plain text into your database. (In which case, you need not escape the password before inserting it because a harmless string - typically hexadecimal - would be produced by …

Member Avatar for tpunt
0
409
Member Avatar for Ozzzi

Within your *Users* class, you could implement a handling method that returns the required page based upon the user ID. The method could look something like the following: Class Users { private $adminIDs = [1, 2]; /* class methods here */ public function whereToGo($userID) { if(in_array($userID, $this->adminIDs, TRUE)) { return …

Member Avatar for Ozzzi
0
575
Member Avatar for blueguy777

Could you also post what the output actually is at the moment? That should help myself and others to find out where you're going wrong easier. What I will comment on within your code though is that your use of mysql_real_escape_string() (MRES) is nugatory. The MRES function was designed to …

Member Avatar for blueguy777
0
130
Member Avatar for gurupts

I don't understand the logic of your database design. Within your "phone_nos" relation (table), why set the persons name as the primary key when people can (and will) have the same first name. Using the ID column would have made more sense as a primary (auto incrementing) key because it …

Member Avatar for tpunt
0
305
Member Avatar for BadManSam

You can do this in the form validation process once the form has been submitted. Seen as you're using the HTTP POST method, you can access the values of all named form parameters through the $_POST superglobal array. Here's a quick example: <?php if(isset($_POST['mailAction'])) { // check if the form …

Member Avatar for BadManSam
0
230
Member Avatar for Darshan Belani

Presuming your table is currently in ascendning mode from an id (the primary, auto incrementing key), you can query your table to order the id to descending mode, and then limit the result set to just one tuple/row: SELECT * FROM table_name ORDER BY id DESC LIMIT 1;

Member Avatar for Icone
0
106
Member Avatar for grantcharov
Member Avatar for getnit

I fail to see how maintanance becomes easier if you've got seven databases you're having to manage and work with for each individual application; as well as updating the data becoming easier. Making sure all of the data is up to sync and not repeated will be your main headache …

Member Avatar for tpunt
0
159

The End.