CariDotMy

 Forgot password?
 Register

ADVERTISEMENT

Author: bender

tumpang tanye psl html n php

[Copy link]
Post time 2-2-2009 02:49 PM | Show all posts
try letak echo macam  i212 cakap

echo $Query="UPDATE temujanji  SET status='$status' WHERE nokp='$nokp' AND bil=$bil ";

lepas tu copy & paste kat phpmyadmin

kalau integer nak letak '' atau tak pun takpe
Reply

Use magic Report


ADVERTISEMENT


Post time 2-2-2009 03:49 PM | Show all posts

Balas #101 BorderManager\ catat

kalau integer nak letak '' atau tak pun takpe

oooo.. php tak check ke type tu.. heheheh.. ingatkan check...

ko dah brapa taun dalam php border?
Reply

Use magic Report

Post time 2-2-2009 07:11 PM | Show all posts
biasa aku telak '' & tak letak sama je

hehe bulan 2 n genap 6 bulan belajor php.... masih mentah lagi
Reply

Use magic Report

Post time 2-2-2009 09:09 PM | Show all posts
Originally posted by BorderManager at 2-2-2009 07:11 PM
biasa aku telak '' & tak letak sama je

hehe bulan 2 n genap 6 bulan belajor php.... masih mentah lagi



wah...6 bulan blaja dah xpert ...
Reply

Use magic Report

Post time 3-2-2009 12:19 AM | Show all posts
dah buleh dah..ader konflik textfield...ader 2 textfield name bil..patotla xdetect....tq...

boardmanager...yg pasal popup tu cane?..yg kat page blakang..
Reply

Use magic Report

Post time 3-2-2009 12:39 AM | Show all posts
lagi 1 pasal code utk insert...

ader 2 page..page A n B

dr page A aku nak ke Page B....

so kat page B tu la tmpt aku nak isi data n save...

tpkan..bila aku masuk je page B tu..trus kuar msgbox data telah disimpan....

patutnya msgbox tu kuar kelpas aku isi data n klik save..

sbb ape ye?
Reply

Use magic Report

Follow Us
Post time 3-2-2009 01:11 AM | Show all posts
mai nak tengok coding ko bab popup tu

if($_POST['form'])
{
   echo 'message';
}
else
{
   echo 'form';
}

mcm n ke??? tak berapa faham soalan
Reply

Use magic Report

Post time 3-2-2009 02:01 PM | Show all posts
Originally posted by BorderManager at 3-2-2009 01:11 AM
mai nak tengok coding ko bab popup tu

if($_POST['form'])
{
   echo 'message';
}
else
{
   echo 'form';
}

mcm n ke??? tak berapa faham soalan



xpaham soklan ek...hihi...

kat page B tu aku ader wat coding Insert utk simpan data dlm dB...patutnye bile kite masuk maklumat2 n then kite klik button save baru dier simpan dlm dB n kuar msgbox la btau yg data dah disimpan.......tp ni..bile je aku bukak page B tu trus dier simpan data n kuar msgbox...x tekan button save lagi...tp data yg disimpan tu xde la sbb maklumat x disi lagik.. ni code page B tu...

<?
date_default_timezone_set('Asia/Kuala_Lumpur');
session_start();
if(!session_is_registered(nokp)){
header("location:loginpelajar.php");
exit();
}

$host="localhost"; // Host name
$username="root"; // Mysql username
$password="1234"; // Mysql password
$db_name="nurani"; // Database name
$tbl_name="mesejpelajar"; // Table name

$db = mysql_connect($host, $username, $password);
if (!$db)
&#160; {
&#160; die('Could not connect: ' . mysql_error());
&#160; }
mysql_select_db($db_name,$db);

$sql =&#160;&#160;"SELECT * FROM inboxpelajar WHERE perkara = '".$_GET['perkara']."'";&#160;
$result = mysql_query($sql) or die("SQL select statement failed");

&#160; &#160;while($row = mysql_fetch_array($result))
&#160; {
&#160;$perkara=$row["perkara"];
&#160;$mesej=$row["mesej"];
&#160;$pengirim2=$row["pengirim2"];
&#160;$nokp2=$row["nokp2"];
&#160; &#160;&#160; }

$pengirim2=$_POST['pengirim2'];&#160;
$perkara=$_POST['perkara'];&#160;
$nokp2=$_POST['nokp2'];
$nokp=$_POST['nokp'];
$pengirim=$_POST['pengirim'];&#160;
&#160;
?>

<html>
<script language=javascript>
&#160;function validated(){
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; var pengirim2 = document.s.pengirim2.value;
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; var perkara = document.s.perkara.value;
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; var mesej = document.s.mesej.value;
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;
&#160;&#160; &#160; &#160; &#160; &#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if(pengirim2==""){&#160;
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; window.alert("Sila Isikan Ruangan pengirim Anda!");
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; document.s.pengirim2.focus();
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; return false;
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; }
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if(perkara==""){&#160;
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; window.alert("lease write your perkara!");
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; document.s.perkara.focus();
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; return false;
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; }
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; if(mesej==""){&#160;
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; window.alert("lease write your mesej!");
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; document.s.mesej.focus();
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; return false;
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; }
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; else
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; return true;&#160;
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; }
&#160;
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; </script>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" c>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {&#160;&#160;//reloads the window if Nav4 resized
&#160; if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
&#160;&#160; &#160;document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
&#160; else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
&#160;<link rel="stylesheet" type="text/css" href="style2.css" />
</head>
<script type="text/javascript">
function check()
{
&#160;
&#160;&#160; &#160; &#160; &#160; alert("No data to delete");
&#160;&#160;
}
</script>
<body>

<div id="Layer4" style="position:absolute; left:420px; top:86px; width:603px; height:483px; z-index:4">&#160;
&#160; <br> <?php
if (isset($_REQUEST['Submit'])) {

$sql = "INSERT INTO mesejpelajar (perkara,mesej,pengirim,nokp,nokp2) values ('".mysql_real_escape_string(stripslashes($_REQUEST['perkara']))."','".mysql_real_escape_string(stripslashes($_REQUEST['mesej']))."','".mysql_real_escape_string(stripslashes($_REQUEST['pengirim']))."' ,'".mysql_real_escape_string(stripslashes($_REQUEST['nokp']))."' ,'".mysql_real_escape_string(stripslashes($_REQUEST['nokp2']))."' )";
if($result = mysql_query($sql ,$db)) {
echo "";&#160;&#160;?>

&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <script language=javascript>
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; window.alert ("Mesej Telah Dihantar");
&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;&#160;&#160;</script> <?
} else {
echo "ERROR: ".mysql_error();
}
} else {}
?>

&#160;
&#160; <table width="75%" border="1"><form name="form1" method="post" action="balaspelajar.php" name='s' onsubmit='return validated()'> &#160;
<input name="nokp2" type="text" id="nokp2" size="12" value="
<?php echo"$nokp2"; ?>" readonly>
<input name="nokp" type="text" id="nokp" size="12" value="
<?php echo"$nokp"; ?>" readonly>
<input name="pengirim" type="text" id="pengirim" size="12" value="
<?php echo"$pengirim"; ?>" readonly>
&#160;&#160; &#160;<tr>&#160;
&#160;&#160; &#160;&#160;&#160;<td bgcolor="#FEF6E2"><strong><font color="#000000" size="2" face="Verdana, Arial, Helvetica, sans-serif">Kepada</font></strong></td>
&#160;&#160; &#160;</tr>
&#160;&#160; &#160;<tr>&#160;
&#160;&#160; &#160;&#160;&#160;<td bgcolor="#FEF6E2"><input name="pengirim2" type="text" id="pengirim2" size="50" value="<?php echo"$pengirim2"; ?>" readonly>
&#160;&#160; &#160;&#160; &#160; <font size="2"> </font></td>
&#160;&#160; &#160;</tr>
&#160;&#160; &#160;<tr>&#160;
&#160;&#160; &#160;&#160;&#160;<td bgcolor="#FEF6E2"><strong><font color="#000000" size="2" face="Verdana, Arial, Helvetica, sans-serif">erkara</font></strong></td>
&#160;&#160; &#160;</tr>
&#160;&#160; &#160;<tr>&#160;
&#160;&#160; &#160;&#160;&#160;<td bgcolor="#FEF6E2"><font size="2"><input name="perkara" type="text" id="perkara" size="50" value="Re:<?php echo"$perkara"; ?>" >
&#160;&#160; &#160;&#160; &#160; </font></td>
&#160;&#160; &#160;</tr>
&#160;&#160; &#160;<tr>&#160;
&#160;&#160; &#160;&#160;&#160;<td bgcolor="#FEF6E2"><strong><font color="#000000" size="2" face="Verdana, Arial, Helvetica, sans-serif">Mesej</font></strong></td>
&#160;&#160; &#160;</tr>
&#160;&#160; &#160;<tr>&#160;
&#160;&#160; &#160;&#160;&#160;<td bgcolor="#FEF6E2"><font size="2"> </font>&#160;
&#160;&#160;&#160;&#160;
&#160;&#160; &#160;&#160; &#160;&#160; &#160;<textarea name="mesej" cols="70" rows="10" id="mesej"&#160;&#160;></textarea>
&#160;&#160; &#160;&#160; &#160;</td>
&#160;&#160; &#160;</tr>
&#160; </table>
&#160;&#160;
&#160;&#160; &#160;<input type="submit" name="Submit" value="Hantar">
&#160; </form>
Reply

Use magic Report


ADVERTISEMENT


Post time 3-2-2009 02:16 PM | Show all posts
ni lak yg popup tu...

Page 1....tmpt search data n&#160;

<?
session_start();
if(!session_is_registered(nokp2)){
header("location:loginkaunselor.php");
exit();
}
$con = mysql_connect("localhost","root","1234");
if (!$con)
&#160; {
&#160; die('Could not connect: ' . mysql_error());
&#160; }

mysql_select_db("nurani", $con);
$sql = "SELECT * FROM kaunselor WHERE nokp2 = '". $_SESSION['nokp2'] ."'";&#160;
$result = mysql_query($sql) or die("SQL select statement failed");

while ($row = mysql_fetch_array($result))  {
&#160;                $nama2=$row["nama"];
&#160;                $email=$row["email"];
&#160;                                                &#160;        &#160;
&#160;                }
&#160;        &#160;        &#160;
&#160;                ?>

<html >
<script language=javascript>
&#160;function validated(){

&#160;var nokp = document.form1.nokp.value;
&#160;&#160;                        if(nokp==""){&#160;
&#160;                        window.alert("Sila Isikan Ruangan Nombor Matrik Pelajar!");
&#160;                        document.form1.nokp.focus();
&#160;                        return false;
&#160;}
}
&#160;                 </script>
<head>
<meta http-equiv="Content-Type" c />
<title>Hostel Electrical Appliances Registration System [ HEARS ]</title>
<link rel="stylesheet" type="text/css" href="style2.css" />
</head>
<body >

<p align="center"> </p>

<div id="Layer4" style="position:absolute; left:420px; top:86px; width:603px; height:211px; z-index:4">&#160;
&#160; <p><div align="center"></div><br/>
<table width="97%" border="0" align="center" cellpadding="3" cellspacing="1">
&#160; <tr>
&#160;   <td bordercolor="#FFFFCC" bgcolor="#FEF6E2">&#160;
&#160;     <p align="center"><strong><font color="#000000">Sila Masukkan No Kad Pengenalan&#160;
&#160;         Pelajar</font></strong></p>
&#160;     <p align="center">&#160;
&#160;     <form action = "borangjumpa.php" method="post" name="form1" class="menu" id="form1"  onsubmit='return validated()'>
&#160;       <div align="center">
&#160;         <label></label>
&#160;         <label>&#160;
&#160;         <input name="nokp" type="text"  size="25" maxlength="200" />
&#160;         <input class="butang" name="Search" type="submit"   value="Cari" />
&#160;         <input class="butang" name="reset" type="reset"   value="Reset" />

&#160;         </label>
&#160;       </div>
&#160;     </form>
&#160;     <p></p></td>
&#160; </tr>
</table>
<p>
&#160; <?php
&#160;                $nokp=$_POST['nokp'];
&#160;        &#160;
&#160;                $con = mysql_connect("localhost","root","1234");
&#160;                if (!$con)
&#160;                         {
&#160;                                 die('Could not connect: ' . mysql_error());
&#160;                         }
&#160;&#160;

&#160;                mysql_select_db("nurani", $con);
&#160;        &#160;
&#160;                                &#160;
&#160;                $Query="SELECT * from pelajar where nokp = '$nokp' ";
&#160;                $dbresult=mysql_query($Query);
&#160;        &#160;
&#160;        &#160;

&#160;                if(mysql_num_rows($dbresult) >0)
&#160;                        {
&#160;                                while($row=mysql_fetch_row($dbresult))
&#160;                                {
&#160;                        &#160;
&#160;                &#160;
&#160;                        echo "<form method=post name=form1 action=borangjumpa2.php >
&#160;                        <table align=center border=1 width=97% bgcolor=#FEF6E2>
&#160;                        <tr>
&#160;   <td>
&#160;                        <font color=#000000 size=2 face=Verdana, Arial, Helvetica, sans-serif><table width=75% border=0 align=center >
&#160; <tr>&#160;
&#160;   <td><div align=center><strong>UNIT BIMBINGAN DAN KAUNSELING</strong></div></td>
&#160; </tr>
</table><br>
<table width=52% border=0 align=center>
&#160; <tr>
&#160;   <td><div align=center>BORANG PERMOHONAN INGIN BERJUMPA PELAJAR </div></td>
&#160; </tr>
</table>
<br>
<div align=center><table width=82% border=0></div>
&#160; <tr>
&#160;   <td>Saya&#160;
&#160;     <input name=nama type=text id=nama size=50 value = '$nama2' readonly=true>
&#160;     (Guru Kaunseling)&#160;
&#160;     <p> Ingin berjumpa dengan&#160;
&#160;       <input name=nama2 type=text id=nama2 size=50 value = '$row[2]' readonly=true>
&#160;       (Nama Pelajar) </p>
&#160;     <p> Tingkatan:&#160;
&#160;       <input name=tingkatan type=text id=tingkatan size=50 value = '$row[10]' readonly=true>
&#160;       <br>
&#160;       <br>
&#160;       Pada: Hari :&#160;
&#160;       <select name=hari id=hari>
&#160;         <option>- Sila Pilih -</option>
&#160;         <option value=Isnin>Isnin</option>
&#160;         <option value=Selasa>Selasa</option>
&#160;         <option value=Rabu>Rabu</option>
&#160;         <option value=Khamis>Khamis</option>
&#160;         <option value=Jumaat>Jumaat</option>
&#160;       </select>
&#160;       Tarikh:&#160;
&#160;       <select name=tarikh id=tarikh>
&#160;         <option>- Sila Pilih -</option>
&#160;         <option value=1>1</option>
&#160;         <option value=2>2</option>
&#160;         <option value=3>3</option>
&#160;         <option value=4>4</option>
&#160;         <option value=5>5</option>
&#160;         <option value=6>6</option>
&#160;         <option value=7>7</option>
&#160;         <option value=8>8</option>
&#160;         <option value=9>9</option>
&#160;         <option value=10>10</option>
&#160;         <option value=11>11</option>
&#160;         <option value=12>12</option>
&#160;         <option value=13>13</option>
&#160;         <option value=14>14</option>
&#160;         <option value=15>15</option>
&#160;         <option value=16>16</option>
&#160;         <option value=17>17</option>
&#160;         <option value=18>18</option>
&#160;         <option value=19>19</option>
&#160;         <option value=20>20</option>
&#160;         <option value=21>21</option>
&#160;         <option value=22>22</option>
&#160;         <option value=23>23</option>
&#160;         <option value=24>24</option>
&#160;         <option value=25>25</option>
&#160;         <option value=26>26</option>
&#160;         <option value=27>27</option>
&#160;         <option value=28>28</option>
&#160;         <option value=29>29</option>
&#160;         <option value=30>30</option>
&#160;         <option value=31>31</option>
&#160;       </select>
&#160;       <select name=tarikh2 id=tarikh2>
&#160;         <option>- Sila Pilih -</option>
&#160;         <option value=Januari>Januari</option>
&#160;         <option value=Februari>Februari</option>
&#160;         <option value=Mac>Mac</option>
&#160;         <option value=April>April</option>
&#160;         <option value=Mei>Mei</option>
&#160;         <option value=Jun>Jun</option>
&#160;         <option value=Julai>Julai</option>
&#160;         <option value=Ogos>Ogos</option>
&#160;         <option value=September>September</option>
&#160;         <option value=Oktober>Oktober</option>
&#160;         <option value=November>November</option>
&#160;         <option value=Disember>Disember</option>
&#160;       </select>
&#160;       <select name=tarikh3 id=tarikh3>
&#160;         <option>- Sila Pilih -</option>
&#160;         <option value=2008>2008</option>
&#160;         <option value=2009>2009</option>
&#160;         <option value=2010>2010</option>
&#160;         <option value=2011>2011</option>
&#160;         <option value=2012>2012</option>
&#160;       </select>
&#160;     </p>
&#160;     <p>Masa :&#160;
&#160;       <input name=masa type=text id=masa size=10>
&#160;       <select name=masa2 id=select>
&#160;         <option>- Sila Pilih -</option>
&#160;         <option value=AM>AM</option>
&#160;         <option value=PM>PM</option>
&#160;       </select>
&#160;     </p>
&#160;     <p>Perkara yang ingin saya bincangkan adalah mengenai masalah yang di hadapinya.</p>
&#160;     <p>Sekian. Terima Kasih,</p>
&#160;&#160;
</td>
</font>
&#160; </tr>
</table></td>
&#160; </tr>
</table>
<br/> &#160;
<div align=center>
<input name=print  type=submit id=print value=Papar onClick=window.open('borangjumpa2.php','mywindow','width=400,height=200' )> </div>
</form> ";
&#160;                        }                              &#160;
&#160;                }&#160;
&#160;        &#160;
&#160;                else
&#160;                {
&#160;                echo " ";
&#160;                 }&#160;
&#160;        &#160;
&#160;
&#160;                                ?>


cth dier kat gmbr bwh nie..mule2 kene cari dulu by ic.....pastu dier akan kuar la maklumat peribadi...pastu just select yg sila pilih tu jela...pastu klik papar tu...dier patutnyer akan pegi ke popup mesej sbb aku nak print popup tu..nak wat white je..nanti kalo xwat popup dier akan print skali ngan banner seme..aku just nak print borang tu je..tu yg nak wat white je...



yg ni lak page 2...

<?
session_start();
if(!session_is_registered(nokp2)){
header("location:loginkaunselor.php");
exit();
}
$con = mysql_connect("localhost","root","1234");
if (!$con)
&#160; {
&#160; die('Could not connect: ' . mysql_error());
&#160; }

mysql_select_db("nurani", $con);
$sql = "SELECT * FROM kaunselor WHERE nokp2 = '". $_SESSION['nokp2'] ."'";&#160;
$result = mysql_query($sql) or die("SQL select statement failed");

while ($row = mysql_fetch_array($result))  {
&#160;                $nama=$row["nama"];
&#160;                                                &#160;        &#160;
&#160;                }
&#160;        &#160;&#160;        &#160;&#160;                ?>

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" c>
</head>

<body >
&#160;        <?php
&#160;                &#160;
&#160;                $nama2=$_POST['nama2'];
&#160;                $tingkatan=$_POST['tingkatan'];
&#160;                $hari=$_POST['hari'];
&#160;                $tarikh=$_POST['tarikh'];
&#160;                $tarikh2=$_POST['tarikh2'];
&#160;                $tarikh3=$_POST['tarikh3'];
&#160;                $masa=$_POST['masa'];
&#160;                $masa2=$_POST['masa2'];
&#160;        ?>

&#160;                <form method="post" name="form1" action="borangjumpa3.php" >
<table width="75%" border="1" align="center">
&#160; <tr>
&#160;   <td><p> </p>
&#160;     <table width="75%" border="0" align="center">
&#160;       <tr>&#160;
&#160;         <td><div align=center><strong>UNIT BIMBINGAN DAN KAUNSELING</strong></div></td>
&#160;       </tr>
&#160;     </table>
&#160;     <br> <table width="52%" border="0" align="center">
&#160;       <tr>&#160;
&#160;         <td><div align=center>BORANG PERMOHONAN INGIN BERJUMPA PELAJAR </div></td>
&#160;       </tr>
&#160;     </table>
&#160;     <p> </p>
&#160;     <table width="82%" border="0" align="center">
&#160;       <tr>&#160;
&#160;         <td>Saya <strong><? echo"$nama";?></strong> (Guru Kaunseling)&#160;
&#160;           <p> Ingin berjumpa dengan <strong><? echo"$nama2";?></strong> (Nama Pelajar) </p>
&#160;           <p> Tingkatan: <strong><? echo"$tingkatan";?></strong> <br>
&#160;             <br>
&#160;             Pada: Hari : <strong><? echo"$hari";?></strong> Tarikh: <strong><? echo"$tarikh";?><? echo"$tarikh2";?><? echo"$tarikh3";?></strong></p>
&#160;           <p>Masa : <strong><? echo"$masa";?><? echo"$masa2";?></strong></p>
&#160;           <p>Perkara yang ingin saya bincangkan adalah mengenai masalah yang&#160;
&#160;             di hadapinya.</p>
&#160;           <p>Sekian. Terima Kasih,</p></td>
&#160;       </tr>
&#160;     </table></td>
&#160; </tr>
</table>
&#160;

<br>
<p align="center">--------------------------------------------------------------------------------------------</p>
<table width="75%" border="1" align="center">
&#160; <tr>&#160;
&#160;   <td><div align="center"><strong>UNIT BIMBINGAN DAN KAUNSELING</strong></div></td>
&#160; </tr>
</table>
<br><table width="52%" border="1" align="center">
&#160; <tr>&#160;
&#160;   <td>BORANG KEBENARAN BERJUMPA KAUNSELOR </td>
&#160; </tr>
</table>
<br/><table width="75%" border="1" align="center">
&#160; <tr>
&#160;   <td><br/><p>Saya _____________________________________________________ (Guru Kelas)</p>
&#160;     <p> (Membenarkan/Tidak Membenarkan)</p>
&#160;     <p> (Nama Pelajar) <strong><? echo" $nama2" ?></strong> Tingkatan : <strong><? echo" $tingkatan" ?></strong></p>
&#160;     <p> Berjumpa tuan/ puan seperti tarikh dan masa yang di sebutkan di atas</p>
&#160;     Alasan (Jika Tidak Membenarkan) _________________________________________&#160;
&#160;     <p>Sekian. Terima Kasih,</p>
&#160;     <p>Yang Benar,<br>
&#160;       &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;<br>
&#160;       ( ______________________ )</p>
&#160;     <p> </p>
&#160;     </td>
&#160; </tr>
</table>
<div align="center"><input name="print"  type=submit id="print" value="Print" > </div>
</form>


so page ni la yg aku nak wat popup sebenarnyer...tp kalo tgk pada gmbr yg aku letak nie...seme maklumat tu dapat aku post...sbb aku wat popup...tp bile aku wat page ni sbg popup..dier tak post data2 tu..kenape yee?
Reply

Use magic Report

Post time 4-2-2009 12:12 AM | Show all posts
cuba ko letak
print_r($_POST); kat line atas

maybe ko terPOST value Submit
tu yg jln script n

if (isset($_REQUEST['Submit'])) {

$sql = "INSERT INTO mesejpelajar (perkara,mesej,pengirim,nokp,nokp2) values ('".mysql_real_escape_string(stripslashes($_REQUEST['perkara']))."','".mysql_real_escape_string(stripslashes($_REQUEST['mesej']))."','".mysql_real_escape_string(stripslashes($_REQUEST['pengirim']))."' ,'".mysql_real_escape_string(stripslashes($_REQUEST['nokp']))."' ,'".mysql_real_escape_string(stripslashes($_REQUEST['nokp2']))."' )";
if($result = mysql_query($sql ,$db)) {
echo "";  ?>
                  } else {
echo "ERROR: ".mysql_error();
}
} else {}
?>
Reply

Use magic Report

Post time 4-2-2009 02:09 AM | Show all posts
Originally posted by BorderManager at 4-2-2009 12:12 AM
cuba ko letak
print_r($_POST); kat line atas

maybe ko terPOST value Submit
tu yg jln script n

if (isset($_REQUEST['Submit'])) {

$sql = "INSERT INTO mesejpelajar (perkara,mesej,pengir ...



print_r($_POST); ...yg ni utk ape?


tp yg submit tu...bile kite klik submit bru dier post kan?.....ke board ader care utk insert data yg lain?
Reply

Use magic Report

Post time 6-2-2009 03:02 PM | Show all posts
yg nak count tu caner...coding ni je ke?

$sql = "SELECT COUNT(*) FROM table WHERE email_status = 'unread'";

....pastu nak echo cane?...
Reply

Use magic Report

Post time 7-2-2009 09:44 PM | Show all posts
$sql = "SELECT COUNT(*) AS total FROM table WHERE email_status = 'unread'";

echo $row['total'];
Reply

Use magic Report

Post time 7-2-2009 10:38 PM | Show all posts
dah try...tp apesal dier bace jugak yg status read ek?..
Reply

Use magic Report

Post time 7-2-2009 10:41 PM | Show all posts
board...cane nak p ke new window bile klik button..not popup..but new window..
Reply

Use magic Report

Post time 8-2-2009 12:02 AM | Show all posts
kalau javascript

onclick="window.location='newpage.html'"
Reply

Use magic Report


ADVERTISEMENT


Post time 8-2-2009 12:32 AM | Show all posts
yg status cane ek?...apesal yg status read pon dier count skali?
Reply

Use magic Report

Post time 8-2-2009 01:02 AM | Show all posts

Balas #117 pzan213\ catat

apa kata pastekan portion tuh... portion yang tunjukkan count tuh..

mungkin senang border nak bagi komen...

lagi satu.. dalam DB value dia read/unread ka atau 0/1
Reply

Use magic Report

Post time 8-2-2009 04:26 PM | Show all posts
<? $sql = "SELECT COUNT (*) FROM mesejpelajar AS total WHERE status = 'Unread' "; ?>


aku isi kat dlm DB..status Unread & Read
Reply

Use magic Report

Post time 8-2-2009 05:47 PM | Show all posts
hmm..kalo nak buat pakai ape yee?



yg ni aku amik cth dr blogspot..

so nanti bile kite add another tu dier akan kuar textfield..ikut brape byk yg kite nak la..pastu save dlm db...cane ye?
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

 

ADVERTISEMENT


Forum Hot Topic

 

ADVERTISEMENT


 


ADVERTISEMENT
Follow Us

ADVERTISEMENT


Mobile|Archiver|Mobile*default|About Us|CariDotMy

25-1-2025 01:35 PM GMT+8 , Processed in 0.063071 second(s), 27 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

Quick Reply To Top Return to the list