Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

PHP I am unable to upload data to PHP my admin

qasim3157

New Coder
<?php
include 'header.php';
?>
<div class="jumbotron">
<h1>Add Your Hotel Details,<br> Welcome to <span style="color:green;">Kana Bachao M sign up 457</span></h1>
<p class="pt-3" style="font-size: 21px;">Create an Account and add your Food</p>
</div>

<div class="container">
<div class="row">
<div class="login col-md-6">
<?php
if (isset($_GET['msignup'])) {
$errorcheck = $_GET['msignup'];
if ($errorcheck == "empty"){
echo "<p class='text-center alert alert-danger'>You'll Need To Fill Up All The Details</p>";
}
if ($errorcheck == "char"){
echo "<p class='text-center alert alert-danger'>Hotel Name Should Only Contain alphabets</p>";
}
if ($errorcheck == "user"){
echo "<p class='text-center alert alert-danger'>Username Already Taken, Kindly Use a Different One</p>";
}
if ($errorcheck == "email"){
echo "<p class='text-center alert alert-danger'>Enter a Valid Email Address</p>";
}
if ($errorcheck == "invalidcontact"){
echo "<p class='text-center alert alert-danger'>Enter a Valid Contact Number</p>";
}
if ($errorcheck == "contact-alreadyexists"){
echo "<p class='text-center alert alert-danger'>Contact Number Already Registered</p>";
}
if ($errorcheck == "checkemail"){
echo "<p class='text-center alert alert-danger'>Email Address Already Registered</p>";
}
}
?>
<form method="POST" action="inc/msignup.inc.php" class="pb-5">
<legend style="border: 1px solid black; border-radius: 6px; color: black; font-size: 20px; font-weight: 500; margin: 0 auto;" class="pl-3 pr-3 pb-3 pt-1" >Create Account
<div class="form-group">
<label>Hotel Name</label>
<input type="text" name="rname" placeholder="Your Hotel Name" class="form-control">
</div>
<div class="form-group">
<label>Username</label>
<input type="text" name="runame" placeholder="username" class="form-control">
</div>
<div class="form-group">
<label>Email</label>
<input type="text" name="remail" placeholder="Hotel Email" class="form-control">
</div>
<div class="form-group">
<label>Restaurent Location/Place</label>
<input type="text" name="rplace" placeholder="Restaurent Place" class="form-control" autocomplete="off">
</div>
<div class="form-group">
<label>Contact No</label>
<input type="text" name="rcontactno" placeholder="Contact Number of Hotel" class="form-control">
</div>
<div class="form-group">
<label>Address</label>
<input type="text" name="raddress" placeholder="Address of Hotel" class="form-control">
</div>
<div class="form-group">
<label>Password</label>
<input type="password" name="rpwd" placeholder="password" class="form-control">

</div>
<button class="btn btn-default btn-md" name="submit">Register</button>
<span class="pl-2 pr-2" style="font-weight: 700; font-size: 15px;">Or</span>
<a class="btn btn-default btn-md" href="mlogin.php">Login</a>
</legend>
</form>
</div>
</div>
</div>

<?php
include 'footer.php';
?>
 
qasim3157, Please use the </> icon above you in the message box to enter long code.
The second long PHP code does not belong here. Remove it. And what is 'msignup' ??? I see it nowhere.
You should check for user input using JS before sending FORM to inc/msignup.inc.php and I would use the whole URL and not the relative one you have here. You should check things again in the PHP.
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom