Kamis, 07 November 2013

PHP Indonesia - Facebook: mastah mastah mu nannya klo ada peringtn undefinde...

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/ 
Start taking a college level music theory class today.

This beginner class is now accessible to aspiring musicians of all ages. Learn all of the basic concepts in an easy to follow manner.
From our sponsors
mastah mastah mu nannya klo ada peringtn undefinde...
Nov 8th 2013, 00:46, by Devri Glizten

Devri Glizten 12:46am Nov 8
mastah mastah mu nannya klo ada peringtn undefinded itu yg hrus di cek apa ya,,,?
bingungg hehe
mkasihh =)

cuplikan scrip :

if(isset($_POST['input']))
{
$topik = $_POST['topik'];
$isi = addslashes (strip_tags ($_POST['isi']));
$gambar = $_FILES['gambar']['name'];

if (strlen($gambar)>0) {
//upload
if (is_uploaded_file($_FILES['gambar']['tmp_name'])) {
move_uploaded_file ($_FILES['gambar']['tmp_name'], "gambarNews/".$gambar);
}
}

if (empty($isi))
{
echo '<script type="text/javascript"> ';
echo 'alert ("Berita Sekolah Harus diisi !!")';
echo '</script>';
echo "<meta http-equiv='refresh'content='0;url=news.php'>";
die;
}
$query = ("insert into news (topik,isi,gambar) values('$topik','$isi','$gambar')");
$sql = mysql_query ($query)or die (mysql_error());
// echo $query;
if (($sql))
{
echo '<script type="text/javascript"> ';
echo 'alert ("Berita Berhasil Ditambah")';
echo '</script>';
echo "<meta http-equiv='refresh'content='0;url=news.php'>";
die;
}

cuplikan form :

<dl>
<dt><label for="newstitle">Topik</label></dt>
<dd><input type="text" name="topik" id="newstitle" class="big"/></dd>
<dt><label for="photo_file">Photo File:</label></dt>
<dd><input type="file" id="photo_file" name="gambar"/></dd>
<dt><label for="newscontent">Isi</label></dt>
<dd><textarea name="isi" id="newscontent" class="big" rows="15"></textarea></dd>
</dl>

Zaenal Bakhtiar 12:50am Nov 8
error_reporting(0);

Mulia Nst 12:51am Nov 8
^ apa lah ini? :/

Devri Glizten 12:52am Nov 8
heheh,, data gambarnya jg gbs di masukan ke db e walupun kita sudh milih filenya,, knp yaag,,hhee maklum ubi baruuu

Mulia Nst 12:54am Nov 8
Contoh kode sederhana... nggak usah panjang-panjang.

Bikin satu file baru untuk ngetes. Isinya
<?php
echo $_POST['test'];

Error-nya sama. Pelajari aja...

Gembel Berkelas 1:16am Nov 8
form nya enctype="multipart/form-data"

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