No result : when I click submit button it show success message as in post sir but actually it don’t save in database
I’m not interested in the query in the first post yet, I need the result of this query
SHOW CREATE TABLE UserLogin
Sound is like you want this .
If the email is already exists then show already exists message
but it also not show.
When I use very simple insert function it also not work.
You already have around 100 rows in the table. How did those get there?
Approx 30, becouse I always confusion in join table. But this is not matter sir .
Table name is available in database sir please look creaful pls.
That doesn’t answer how they got there.
Anyway, do these queries INSERT and SELECT without any problem?
INSERT INTO UserLogin (CustID
, ReqID
, Name
, Email_ID
, Protocol
, System
, isEmailConfirmed
, Emailtoken
, EmailtokenExpire)
VALUES ('CRN01234567'
, 'REQ0A1B2C3D4'
, 'name'
, 'noemail@example.com'
, '123.231.123.231'
, 'No-user-agent'
, 'PENDING'
, 'qwertyuioplkjhgfdsazxcvbnmQWERTYUIOPLKJHGFDSAZXCVBNM0123456789!$/()*'
, '2018-08-01 01:01:01')
and
SELECT CustID
, ReqID
, Name
, Email_ID
, Protocol
, System
, isEmailConfirmed
, Emailtoken
, EmailtokenExpire
FROM UserLogin
WHERE
CustID IS NOT NULL
AND ReqID IS NOT NULL
AND Name IS NOT NULL
AND Email_ID IS NOT NULL
AND Protocol IS NOT NULL
AND System IS NOT NULL
AND isEmailConfirmed IS NOT NULL
AND Emailtoken IS NOT NULL
AND EmailtokenExpire IS NOT NULL
As you command when I edit like this below it not work. I have special request. I know this is not paid service this is learning center bit same like where same like you wanna help peoples in code. But I try to practice make is good from many days but it didn’t make from my side. I mentioned my database SQL, config file as authConfig.php and html in website demo and php As in post. Please try to add into my or your database via localhost or as you wish. If you get duplicate email error then, it will indicates code is working. Still this is not helpful sir. Thank you! Watching this post continually:
if ($name == "" || $email == "" )
$msg = "<div id='myTostwarning'>All fields is required to go ahead.</div>";
else {
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$msg= "<div id='myTostwarning'>Invalid formate of your email, re-enter valid email address</div>"; }else{
$sql = $con->query("SELECT * FROM UserLogin WHERE Email_ID='$email'");
if ($sql->num_rows > 0) {
$msg = "<div id='myTosterror'>Email already exist in our records</div>";
} else {
$token = 'qwertyuioplkjhgfdsazxcvbnmQWERTYUIOPLKJHGFDSAZXCVBNM0123456789!$/()*';
$token = str_shuffle($token);
$token = substr($token, 0,70);
$con->query("INSERT INTO UserLogin (
CustID
, ReqID
, Name
, Email_ID
, Protocol
, System
, isEmailConfirmed
, Emailtoken
, EmailtokenExpire) VALUES ('CRN01234567'
, 'REQ0A1B2C3D4'
, 'name'
, 'noemail@example.com'
, '123.231.123.231'
, 'No-user-agent'
, 'PENDING'
, 'qwertyuioplkjhgfdsazxcvbnmQWERTYUIOPLKJHGFDSAZXCVBNM0123456789!$/()*'
, '2018-08-01 01:01:01') ");
Is there something error in my php info? https://bit.ly/2M6Wu3R
I did not mean for you to put those queries in your code, I meant for you to either run them in the CLI, phpMyAdmin or how you did with the “SHOW” query.
Thank you to @Mittineague who guideline me and make focus on my mistake. Actually I create a mistake in my database where I make mostly row value as None . When @Mittineague tell me to add code in Myphpadmin then this alert show that this $row value not null I fixed it and make default value as NULL. and then it work.
I not under why it happens : None and Null what different.