how to insert data in previous register data in database queries?How does database indexing work?How do I quickly rename a MySQL database (change schema name)?How to list the tables in a SQLite database file that was opened with ATTACH?How to output MySQL query results in CSV format?How do I connect to a MySQL Database in Python?How to 'insert if not exists' in MySQL?How to get size of mysql database?What are the options for storing hierarchical data in a relational database?How to get the sizes of the tables of a MySQL database?PHP no error detected but not showing properly
How can I raise concerns with a new DM about XP splitting?
Can the electrostatic force be infinite in magnitude?
Can somebody explain Brexit in a few child-proof sentences?
Superhero words!
A workplace installs custom certificates on personal devices, can this be used to decrypt HTTPS traffic?
Can I rely on these GitHub repository files?
Organic chemistry Iodoform Reaction
Are Warlocks Arcane or Divine?
Teaching indefinite integrals that require special-casing
Partial sums of primes
What is the opposite of 'gravitas'?
Freedom of speech and where it applies
How do ultrasonic sensors differentiate between transmitted and received signals?
Lightning Web Component - do I need to track changes for every single input field in a form
How to check participants in at events?
Is exact Kanji stroke length important?
For airliners, what prevents wing strikes on landing in bad weather?
What if somebody invests in my application?
Simple recursive Sudoku solver
Can I create an upright 7-foot × 5-foot wall with the Minor Illusion spell?
Lifted its hind leg on or lifted its hind leg towards?
Why isn't KTEX's runway designation 10/28 instead of 9/27?
What do you call the infoboxes with text and sometimes images on the side of a page we find in textbooks?
Latex for-and in equation
how to insert data in previous register data in database queries?
How does database indexing work?How do I quickly rename a MySQL database (change schema name)?How to list the tables in a SQLite database file that was opened with ATTACH?How to output MySQL query results in CSV format?How do I connect to a MySQL Database in Python?How to 'insert if not exists' in MySQL?How to get size of mysql database?What are the options for storing hierarchical data in a relational database?How to get the sizes of the tables of a MySQL database?PHP no error detected but not showing properly
I am developing an android application where I am registering an user by its username and after that again I want to register a candidate on same username. How to write php script(api) for this..Thanks in advanced
<?php
if($_SERVER['REQUEST_METHOD']=='POST')
include 'config.php';
$con = mysqli_connect($host,$user,$password,$db);
$S_name = $_POST['StudentName'];
$S_Phone = $_POST['StudentPhone'];
$S_Class = $_POST['StudentClass'];
$Sql_Query = "INSERT INTO registerDemo
(register_name,phone_number,class)
values ('$S_name','$S_Phone','$S_Class')";
if(mysqli_query($con,$Sql_Query))
echo 'Student Registered Successfully';
else
echo 'Something went wrong';
mysqli_close($con);
?>
mysql database phpmyadmin
|
show 4 more comments
I am developing an android application where I am registering an user by its username and after that again I want to register a candidate on same username. How to write php script(api) for this..Thanks in advanced
<?php
if($_SERVER['REQUEST_METHOD']=='POST')
include 'config.php';
$con = mysqli_connect($host,$user,$password,$db);
$S_name = $_POST['StudentName'];
$S_Phone = $_POST['StudentPhone'];
$S_Class = $_POST['StudentClass'];
$Sql_Query = "INSERT INTO registerDemo
(register_name,phone_number,class)
values ('$S_name','$S_Phone','$S_Class')";
if(mysqli_query($con,$Sql_Query))
echo 'Student Registered Successfully';
else
echo 'Something went wrong';
mysqli_close($con);
?>
mysql database phpmyadmin
Your script is wide open to SQL Injection Attack Even if you are escaping inputs, its not safe! Use prepared parameterized statements in either theMYSQLI_
orPDO
API's
– RiggsFolly
Mar 7 at 10:28
Sorry, I dont understand what you are asking here. Can you edit your question so it is more obvious what you are asking for help with please
– RiggsFolly
Mar 7 at 10:29
Small Point You open the connection to the database INSIDE the IF but you close it OUTSIDE the IF? Move the close inside the IF
– RiggsFolly
Mar 7 at 10:30
How to write the php script so that I can insert (register_name,phone number and class) in registered username.
– Prashant Das
Mar 7 at 10:33
Do you mean you have another table calledregistered
that you want to place this data into? Or are you saying that the code you show us does not work
– RiggsFolly
Mar 7 at 10:34
|
show 4 more comments
I am developing an android application where I am registering an user by its username and after that again I want to register a candidate on same username. How to write php script(api) for this..Thanks in advanced
<?php
if($_SERVER['REQUEST_METHOD']=='POST')
include 'config.php';
$con = mysqli_connect($host,$user,$password,$db);
$S_name = $_POST['StudentName'];
$S_Phone = $_POST['StudentPhone'];
$S_Class = $_POST['StudentClass'];
$Sql_Query = "INSERT INTO registerDemo
(register_name,phone_number,class)
values ('$S_name','$S_Phone','$S_Class')";
if(mysqli_query($con,$Sql_Query))
echo 'Student Registered Successfully';
else
echo 'Something went wrong';
mysqli_close($con);
?>
mysql database phpmyadmin
I am developing an android application where I am registering an user by its username and after that again I want to register a candidate on same username. How to write php script(api) for this..Thanks in advanced
<?php
if($_SERVER['REQUEST_METHOD']=='POST')
include 'config.php';
$con = mysqli_connect($host,$user,$password,$db);
$S_name = $_POST['StudentName'];
$S_Phone = $_POST['StudentPhone'];
$S_Class = $_POST['StudentClass'];
$Sql_Query = "INSERT INTO registerDemo
(register_name,phone_number,class)
values ('$S_name','$S_Phone','$S_Class')";
if(mysqli_query($con,$Sql_Query))
echo 'Student Registered Successfully';
else
echo 'Something went wrong';
mysqli_close($con);
?>
mysql database phpmyadmin
mysql database phpmyadmin
edited Mar 7 at 11:40
F8xLag
85
85
asked Mar 7 at 10:22
Prashant DasPrashant Das
327
327
Your script is wide open to SQL Injection Attack Even if you are escaping inputs, its not safe! Use prepared parameterized statements in either theMYSQLI_
orPDO
API's
– RiggsFolly
Mar 7 at 10:28
Sorry, I dont understand what you are asking here. Can you edit your question so it is more obvious what you are asking for help with please
– RiggsFolly
Mar 7 at 10:29
Small Point You open the connection to the database INSIDE the IF but you close it OUTSIDE the IF? Move the close inside the IF
– RiggsFolly
Mar 7 at 10:30
How to write the php script so that I can insert (register_name,phone number and class) in registered username.
– Prashant Das
Mar 7 at 10:33
Do you mean you have another table calledregistered
that you want to place this data into? Or are you saying that the code you show us does not work
– RiggsFolly
Mar 7 at 10:34
|
show 4 more comments
Your script is wide open to SQL Injection Attack Even if you are escaping inputs, its not safe! Use prepared parameterized statements in either theMYSQLI_
orPDO
API's
– RiggsFolly
Mar 7 at 10:28
Sorry, I dont understand what you are asking here. Can you edit your question so it is more obvious what you are asking for help with please
– RiggsFolly
Mar 7 at 10:29
Small Point You open the connection to the database INSIDE the IF but you close it OUTSIDE the IF? Move the close inside the IF
– RiggsFolly
Mar 7 at 10:30
How to write the php script so that I can insert (register_name,phone number and class) in registered username.
– Prashant Das
Mar 7 at 10:33
Do you mean you have another table calledregistered
that you want to place this data into? Or are you saying that the code you show us does not work
– RiggsFolly
Mar 7 at 10:34
Your script is wide open to SQL Injection Attack Even if you are escaping inputs, its not safe! Use prepared parameterized statements in either the
MYSQLI_
or PDO
API's– RiggsFolly
Mar 7 at 10:28
Your script is wide open to SQL Injection Attack Even if you are escaping inputs, its not safe! Use prepared parameterized statements in either the
MYSQLI_
or PDO
API's– RiggsFolly
Mar 7 at 10:28
Sorry, I dont understand what you are asking here. Can you edit your question so it is more obvious what you are asking for help with please
– RiggsFolly
Mar 7 at 10:29
Sorry, I dont understand what you are asking here. Can you edit your question so it is more obvious what you are asking for help with please
– RiggsFolly
Mar 7 at 10:29
Small Point You open the connection to the database INSIDE the IF but you close it OUTSIDE the IF? Move the close inside the IF
– RiggsFolly
Mar 7 at 10:30
Small Point You open the connection to the database INSIDE the IF but you close it OUTSIDE the IF? Move the close inside the IF
– RiggsFolly
Mar 7 at 10:30
How to write the php script so that I can insert (register_name,phone number and class) in registered username.
– Prashant Das
Mar 7 at 10:33
How to write the php script so that I can insert (register_name,phone number and class) in registered username.
– Prashant Das
Mar 7 at 10:33
Do you mean you have another table called
registered
that you want to place this data into? Or are you saying that the code you show us does not work– RiggsFolly
Mar 7 at 10:34
Do you mean you have another table called
registered
that you want to place this data into? Or are you saying that the code you show us does not work– RiggsFolly
Mar 7 at 10:34
|
show 4 more comments
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55041388%2fhow-to-insert-data-in-previous-register-data-in-database-queries%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55041388%2fhow-to-insert-data-in-previous-register-data-in-database-queries%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Your script is wide open to SQL Injection Attack Even if you are escaping inputs, its not safe! Use prepared parameterized statements in either the
MYSQLI_
orPDO
API's– RiggsFolly
Mar 7 at 10:28
Sorry, I dont understand what you are asking here. Can you edit your question so it is more obvious what you are asking for help with please
– RiggsFolly
Mar 7 at 10:29
Small Point You open the connection to the database INSIDE the IF but you close it OUTSIDE the IF? Move the close inside the IF
– RiggsFolly
Mar 7 at 10:30
How to write the php script so that I can insert (register_name,phone number and class) in registered username.
– Prashant Das
Mar 7 at 10:33
Do you mean you have another table called
registered
that you want to place this data into? Or are you saying that the code you show us does not work– RiggsFolly
Mar 7 at 10:34