I want to display user id upon his email, but I have an error [duplicate]
up vote
-2
down vote
favorite
This question already has an answer here:
When to use single quotes, double quotes, and back ticks in MySQL
12 answers
mysql_fetch_array()/mysql_fetch_assoc()/mysql_fetch_row()/mysql_num_rows etc… expects parameter 1 to be resource
31 answers
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:wampwwwAdobe Online MCQ Examt1.php on line 11.
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "adobe";
$sid = 33 + 0;
$m = "mwbaig@gmail.com";
$con = mysqli_connect($servername,$username,$password,$dbname);
$result = mysqli_query($con,"SELECT * FROM 'sup' WHERE smail = '$m';");
$row = mysqli_fetch_array($result);
$userid = $row['smail'];
?>
php phpmyadmin
New contributor
user9747729 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
marked as duplicate by mickmackusa, Jeff, Nigel Ren
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 10 at 13:37
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
up vote
-2
down vote
favorite
This question already has an answer here:
When to use single quotes, double quotes, and back ticks in MySQL
12 answers
mysql_fetch_array()/mysql_fetch_assoc()/mysql_fetch_row()/mysql_num_rows etc… expects parameter 1 to be resource
31 answers
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:wampwwwAdobe Online MCQ Examt1.php on line 11.
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "adobe";
$sid = 33 + 0;
$m = "mwbaig@gmail.com";
$con = mysqli_connect($servername,$username,$password,$dbname);
$result = mysqli_query($con,"SELECT * FROM 'sup' WHERE smail = '$m';");
$row = mysqli_fetch_array($result);
$userid = $row['smail'];
?>
php phpmyadmin
New contributor
user9747729 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
marked as duplicate by mickmackusa, Jeff, Nigel Ren
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 10 at 13:37
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
When to use backtick, single quotes, and double quotes. Duplicate
– mickmackusa
Nov 10 at 13:29
Assuming$mcomes from a user submission, your query is insecure. You should read about prepared statements.
– mickmackusa
Nov 10 at 13:31
add a comment |
up vote
-2
down vote
favorite
up vote
-2
down vote
favorite
This question already has an answer here:
When to use single quotes, double quotes, and back ticks in MySQL
12 answers
mysql_fetch_array()/mysql_fetch_assoc()/mysql_fetch_row()/mysql_num_rows etc… expects parameter 1 to be resource
31 answers
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:wampwwwAdobe Online MCQ Examt1.php on line 11.
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "adobe";
$sid = 33 + 0;
$m = "mwbaig@gmail.com";
$con = mysqli_connect($servername,$username,$password,$dbname);
$result = mysqli_query($con,"SELECT * FROM 'sup' WHERE smail = '$m';");
$row = mysqli_fetch_array($result);
$userid = $row['smail'];
?>
php phpmyadmin
New contributor
user9747729 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
This question already has an answer here:
When to use single quotes, double quotes, and back ticks in MySQL
12 answers
mysql_fetch_array()/mysql_fetch_assoc()/mysql_fetch_row()/mysql_num_rows etc… expects parameter 1 to be resource
31 answers
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:wampwwwAdobe Online MCQ Examt1.php on line 11.
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "adobe";
$sid = 33 + 0;
$m = "mwbaig@gmail.com";
$con = mysqli_connect($servername,$username,$password,$dbname);
$result = mysqli_query($con,"SELECT * FROM 'sup' WHERE smail = '$m';");
$row = mysqli_fetch_array($result);
$userid = $row['smail'];
?>
This question already has an answer here:
When to use single quotes, double quotes, and back ticks in MySQL
12 answers
mysql_fetch_array()/mysql_fetch_assoc()/mysql_fetch_row()/mysql_num_rows etc… expects parameter 1 to be resource
31 answers
php phpmyadmin
php phpmyadmin
New contributor
user9747729 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user9747729 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited Nov 10 at 14:01
jww
51.8k37211477
51.8k37211477
New contributor
user9747729 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked Nov 10 at 13:25
user9747729
1
1
New contributor
user9747729 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user9747729 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
user9747729 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
marked as duplicate by mickmackusa, Jeff, Nigel Ren
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 10 at 13:37
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by mickmackusa, Jeff, Nigel Ren
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 10 at 13:37
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
When to use backtick, single quotes, and double quotes. Duplicate
– mickmackusa
Nov 10 at 13:29
Assuming$mcomes from a user submission, your query is insecure. You should read about prepared statements.
– mickmackusa
Nov 10 at 13:31
add a comment |
When to use backtick, single quotes, and double quotes. Duplicate
– mickmackusa
Nov 10 at 13:29
Assuming$mcomes from a user submission, your query is insecure. You should read about prepared statements.
– mickmackusa
Nov 10 at 13:31
When to use backtick, single quotes, and double quotes. Duplicate
– mickmackusa
Nov 10 at 13:29
When to use backtick, single quotes, and double quotes. Duplicate
– mickmackusa
Nov 10 at 13:29
Assuming
$m comes from a user submission, your query is insecure. You should read about prepared statements.– mickmackusa
Nov 10 at 13:31
Assuming
$m comes from a user submission, your query is insecure. You should read about prepared statements.– mickmackusa
Nov 10 at 13:31
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
When to use backtick, single quotes, and double quotes. Duplicate
– mickmackusa
Nov 10 at 13:29
Assuming
$mcomes from a user submission, your query is insecure. You should read about prepared statements.– mickmackusa
Nov 10 at 13:31