Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,223 members, 7,818,764 topics. Date: Monday, 06 May 2024 at 01:09 AM

Codelove's Posts

Nairaland Forum / Codelove's Profile / Codelove's Posts

(1) (of 1 pages)

Webmasters / How To Code Comment Box With PHP And Mysql by codelove: 7:33am On May 11, 2017
i am developing a comment box with php and mysql,but my problem now is how to post the comment after user has enter their comment.so far i my php and mysql that save the comment in the database,but i want it to be visible on my webpage after it is save to database,i don't know the code for that,i need help.



[CODE]
<!DOCTYPE html>
<html>
<head>
<title>
commenting system
</title>
</head>
<body>

<form action = "cm.php" method = "POST">
<input type = "text" name = "fname" placeholder = "Name"><br><br>
<input type = "text" name = "website" placeholder = "website"><br><br>
<textarea type = "text" name = "scomment" rows = "6" col = "250" placeholder = "comment here....">
</textarea>
<button type = "submit">SUBMIT</button>
</form>


</body>
</html>

cm.php

<?php
include 'db.php';
$fname = $_POST['fname'];
$website = $_POST['website'];
$scomment = $_POST['scomment'];

$sql = "INSERT INTO client (fname, website, comment) VALUES ('$fname', '$website', '$scomment')";
$result = $con->query($sql);


header("Location:index.php"wink;

?>

db.php

<?php

$con = mysqli_connect("localhost", "root", "", "comment"wink;

if(!$con){
die("connection error".mysqli_connect_error());
}

[/CODE]
Webmasters / Javascript by codelove: 2:20pm On May 04, 2017
please i have a problem,i create new input field when a button is click,but i want each of the new create field to have a unique id,so i can use it for calculation in javascript.

function create(){

var newinput = document.createElement('input');
newinput.placeholder = "test1";

document.getElementById("mytest"wink.appendChild(newinput);
}
Webmasters / Webdesign by codelove: 7:36pm On Mar 30, 2017
please i have a website and i want to link a facebook icon to my web page in facebook and also add a share and like button but i don't know how to go about it i need help.
Webmasters / Re: Web Design by codelove: 8:28am On Mar 30, 2017
thanks it worked as i wanted.
Webmasters / Web Design by codelove: 7:55am On Mar 30, 2017

please i need help i am try to do mouse hover on my web site but i have a problem,when i hover my mouse on a li it affect the other but i cn't figure out the problem please this is my code sumome should help me out thanks.
<div id = "tutorials-header-list">
<ul id = "menu">
<li><a href="#">Home</a></li>
<li><a href="#">About-us</a></li>
<li><a href="#">Library</a></li>
<li><a href="#">grammar-rule</a></li>
<li><a href="#">Online-Calculators</a></li>
</ul>
</div>

<style>

#menu{
height:50px;
width:100%;
background:black;
}

#menu li {
float:left;
display:inline-block;
margin-left:40px;
}

#tutorials-header-list #menu:hover li{
width:120px;
height:50px;
background:white;

}
</style>



(1) (of 1 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 13
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.