Senin, 23 September 2013

PHP Indonesia - Facebook: permisi teman2. saya mau tanya. saya ingin buat cl...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
Learn Adobe Illustrator CS6 Master Techniques from an Adobe Guru!

With over 25 years of experience teaching, Robert Farrell has been a trusted instructor for individuals and companies who want to improve their Adobe skills.
From our sponsors
permisi teman2. saya mau tanya. saya ingin buat cl...
Sep 24th 2013, 00:27, by Muhammad Ramdhani

Muhammad Ramdhani 12:27am Sep 24
permisi teman2. saya mau tanya. saya ingin buat click to add textbox. sudah bisa, tp saya bingung dalam penyimpanan ke databasenya. kaya digambar di poto maksud ane.

ini codingannya:

<?php
//Include the database class
require("classes/db.class.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>jQuery</title>
<script type="text/javascript" src="js/jquery.js"></script>
<link rel="stylesheet" type="text/css" href="css/css.css" />
<script type="text/javascript">
var count = 0;
$(function(){
$('p#add_field').click(function(){
count += 1;
$('#container').append(
'<strong>Link #' + count + '</strong><br />'
+ '<input id="field_' + count + '" name="fields[]' + '" type="text" /><br />' );

});
});
</script>

<body>

<?php
if (isset($_POST['btnSubmit'])) {

$db = new mysqldb();
$db->select_db();

if ($_POST['fields']) {


foreach ( $_POST['fields'] as $key=>$value ) {


$sql_website = sprintf("INSERT INTO websites (Website_URL,webiset_2) VALUES ('%s','%s')",
mysql_real_escape_string($value),mysql_real_escape_string($value));
$result_website = $db->query($sql_website);


}

} else {

}
echo "<h1>User Added, <strong>" . count($_POST['fields']) . "</strong> website(s) added for this user!</h1>";

$db->kill();
}
?>

<?php if (!isset($_POST['btnSubmit'])) { ?>
<h1>New User Signup</h1>
<form name="test" method="post" action="">

<div class="spacer"></div>

<div id="container">
<p id="add_field"><a href="#"><span>&raquo; add</span></a></p>
</div>

<div class="spacer"></div>
<input id="go" name="btnSubmit" type="submit" value="Signup" class="btn" />
</form>
<?php } ?>

</body>
</html>

Muhammad Mahrus Zain 12:39am Sep 24
pakek limit 0,2 aja

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar