Jump to content

jpergega

Members
  • Posts

    33
  • Joined

  • Last visited

jpergega's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Hi I have a login form but when I click on the submit button it does nothing. I looked up and some people said is to do with JQuery but I don't know JQuery at all. Could someone please tell me how can I make the submit button work please? Here is my code: <div id="loginbox" style="margin-top:50px;" class="mainbox col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2"> <div class="panel panel-info" > <div class="panel-heading"> <div class="panel-title">Sign In</div> <div style="float:right; font-size: 80%; position: relative; top:-10px"><a href="#">Forgot password?</a></div> </div> <div style="padding-top:30px" class="panel-body" > <div style="display:none" id="login-alert" class="alert alert-danger col-sm-12"></div> <form id="loginform" class="form-horizontal" action="signup.php" method="POST"> <div style="margin-bottom: 25px" class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span> <input id="login-username" type="text" class="form-control" name="username" value="" placeholder="username"> </div> <div style="margin-bottom: 25px" class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span> <input id="login-password" type="password" class="form-control" name="password" placeholder="password"> </div> <div style="margin-bottom: 25px" class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span> <select id="type" class="form-control" Placeholder="Select option.."name="permission"> <option value="Student" selected="selected">Student</option> <option value="Staff">Staff</option> <option value="Admin">Administrator</option> </select> </div> <div class="input-group"> <div class="checkbox"> <label> <input id="login-remember" type="checkbox" name="remember" value="1">Remember me</label> </div> </div> <div style="margin-top:10px" class="form-group"> <!-- Button --> <div class="col-sm-12 controls"> <input type="button" name="submit" value="Sign in"> <!--<a id="btn-fblogin" href="" class="btn btn-primary">Login with Facebook</a>--> </div> </div> <div class="form-group"> <div class="col-md-12 control"> <div style="border-top: 1px solid#888; padding-top:15px; font-size:85%" > Don't have an account! <a href="#" onClick="$('#loginbox').hide(); $('#signupbox').show()"> Sign Up Here </a> </div> </div> </div> </form> </div> </div> </div>
  2. Hi, I have a table contains 2 foreign keys and I am having trouble inserting a record to this table. Below is my code: $query = " INSERT INTO reply ( foreignKey1_id,foreignKey2_id,message,date_Created ) VALUES ( '$foreignKey1','$foreignkey2', '$msg',NOW() )"; This is the error message: Cannot add or update a child row: a foreign key constraint fails.................... I have used the disable foreign key checks but still getting this error. Is there other way to make this work? Thanks
  3. Hi, I want to add new records to a table and there is a foreign key in this table, so I set the disable foreign key via phpmyadmin export, then I re-imported back to the database. However, I am still getting the cannot add or update a child table message. Please tell me what I'm doing wrong here. Thanks $postNT = " INSERT INTO `tbl_A` ( id, message, date, ) VALUES ( '{$_SESSION['id']}', '{$msg}', NOW())";
  4. Thanks for this I am using WAMP Server I changed my files' extension to .php and is now giving me error message inside the image frame says: call to undefined function functionName() Here is how I call the function : <img class="img-responsive" src="<?php include 'functions.php'; getImage(); ?>" >
  5. Sorry this is what I got: <a class="thumbnail" href="#"> <img class="img-responsive" src="<?php getImage(); ?>" > </a>
  6. I only can see this error message : Failed to load resource: the server responded with a status of 403 (Forbidden)
  7. Hi I am trying to fetch photos from the database but it doesn't show on the website page: PHP - function getImage(){ $query = "SELECT * FROM imgLib WHERE id=$_SESSION['id']"; $result = mysqli_query($con, $query); while($row = mysqli_fetch_assoc($result)){ echo $row['img']; } } HTML - <img class="img-responsive" src="<?php getImage(); ?>" > Result on Website page - see attachment Thanks
  8. Great thank you is working now
  9. Thanks I found the solution
  10. Hi My query is like this and is saying there is an syntax error near 'cusomter_id')}' what am I doing wrong here? $query = " INSERT INTO `imglib` ( `img_name`, `img_type`, `img_size`, `img`,`customer_id` ) VALUES ( '{$name}', '{$mime}', {$size}, '{$data}','{SELECT(customer_id FROM customer WHERE customer_id='cusomter_id')}' )"; Thanks
  11. Hi My query is like this and is saying there is an syntax error near 'cusomter_id')}' what am I doing wrong here? $query = " INSERT INTO `imglib` ( `img_name`, `img_type`, `img_size`, `img`,`customer_id` ) VALUES ( '{$name}', '{$mime}', {$size}, '{$data}','{SELECT(customer_id FROM customer WHERE customer_id='cusomter_id')}' )"; Thanks
  12. Sorry by the way I am using Chrome
  13. Hi Here is my code but I am not sure why is not working could you please help? Thanks <input id="txt" type="text" name="Name" spellcheck="true" required/>
×
×
  • Create New...