All my information is going into the database that is being saved but I want it to come back up when I log in using a unique email. I have tried a lot of different codes within php. This is what I recently tried.
$result_habit = mysqli_query ($con, $query_habit);
if (mysqli_num_rows($result_habit) ==1) {
echo "found the row for ", $Email;
$row = mysqli_fetch_row($result_habit);
echo "$row[c1]"
I want it to display the information from the table 'habit' and each row is labeled c1, c2, c3, etc Is there anything else I have to do to get the saved data to display for each unique login email? thanks
$result_habit = mysqli_query ($con, $query_habit);
if (mysqli_num_rows($result_habit) == 1) {
echo "found the row for ", $Email;
$row = mysqli_fetch_row($result_habit);
echo $row['c1'];
}
This should be the correct way to write the code. All you seemed to have missed was a closing bracket and echoing the row variable correctly.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.