Tous les messages dans PHP
can we set cookies and have sweet alert redirect at the same time?
- Post By Coll 23
- 4 years ago
Hi Manfred, As per my register.php screenshot, how can we set cookies and have sweet alert redirect at the same time?
How can i create a proper message text area with input tag to store php value?
- Post By Coll 23
- 4 years ago
Isset function on echoing out alerts
- Post By Coll 23
- 4 years ago
Hi all,
Redirect navbar links to another page via php
- Post By Coll 23
- 4 years ago
Hi admins,
Config error at my output page
- Post By Mike Hunt Is Bald
- 4 years ago
There is an error message when i do not fill in the compulsory fields.
PHP : Redirect user back to LoggedIn page after logging in
- Post By Ng WJ
- 4 years ago
I have problem coding for SESSION approach using in index.php (login page)
Is there a difference when deleting cookies using the PHP setcookie() Function by using "0" or "false" as Boolean values instead of using an empty string (like this " ")?
- Post By Arun Raj
- 4 years ago
Hello everyone!
But my question is, is there any other differences between the first and the other two methods? Or is it just a matter of personal choice/company culture?
How to set Gender Male to show the word "Male" when I echo it from radio button?
- Post By Mike Hunt Is Bald
- 4 years ago
Hello my code is
Multiple Files Upload
- Post By Li Sen TAN
- 4 years ago
undefined array key and variable
- Post By Coll 23
- 4 years ago
include('core/config.php');
include('core/db.php');
include('core/functions.php');
isNotLoggedIn(); //redirect to login page
$userID = $_COOKIE["userID"];
// Query user info from DB
$userQuery = DB::query("SELECT * FROM users WHERE userID = %i", $userID);
foreach($userQuery as $userResult){
$userEmail = $userResult["userEmail"];
$userPermission = $userResult["userPermission"];
}
// Setting permission text
if($userPermission == 1){
$userPermissionText = "Admin";
}else if($userPermission == 0){
$userPermissionText = "User";
}
Any idea why is this error popping up?
forEach-Loop
- Post By Coll 23
- 4 years ago
//When i print out the code below, it give ms only 1 result . Not sure why.//
$bikes = array("Honda"=>"exMotion", "Honda"=>"Adv150", "Honda"=>"NC750");
foreach($bikes as $bike => $model) {
echo "$bike = $model
";
}
Remove first and last character from a string - PHP
- Post By Student Bot
- 4 years ago
I want to remove the first and last word from a string.
$string = "12121";
I tried trimming it like:
$string = "12121";
$trimmed = trim($string, 1);
print($trimmed);
Result shows 22, but I want 212. Please help.