sungpeng
-
Posts
290 -
Joined
-
Last visited
Posts posted by sungpeng
-
-
Thank You
-
Thank You
-
mysql_query("update pupils set record='running' where pid !='$testing[0]'AND pid !='$testing[1]'AND pid !='$testing[2]'AND pid !='$testing[3]'AND pid !='$testing[4]'etc")Anyway to add in a loop ?
-
Sometime we got to check it and sometime uncheck it and update the uncheck in mysql as well.
-
understood, it will get the value of the checked box. Wish to know how to get the value for the unchecked box ?
-
foreach ($_POST as $key => $value) {
echo "$key";echo "$value";}$key and $value are empty. -
Another question is when i post it over to posting.php, can i just get the staff that is posted. No need to loop through all value to check if it contain value.
-
I need the while loop to fetch data from mysql. If i use a while loop and put a foreach loop inside, it will generate a lot of unnecessary checkbox.
-
print_r(array_values($array));
still display only one value instead of many loop value.
-
No can't work. The posting.php display a word Array. Is there any edition to do with the posting.php page ?
-
if($x==""){
$x=1;
}
<form name='Form' action='posting.php' method='post'>
while($do=mysql_fetch_array($sql){
<input type='checkbox' name='<?php print $x; ?>' value='<?php print $do[id]; ?>' />
$x++;
}
<input type='submit' name='checked' value='checking'>
Still the same problem
-
if($x==""){
$x=1;
}
while($do=mysql_fetch_array($sql){
<form name='Form' action='posting.php' method='post'>
<input type='checkbox' name='<?php print $x; ?>' value='<?php print $do[id]; ?>' />
<input type='submit' name='checked' value='checking'>
$x++;
}
When I click on the submit button, only one value of $x is sent to posting.php instead of multiple loop values in checkbox. Does anyone have a solution to it ?
Under Posting.php
for ($x = 1; $x <= 20; $x++) {
$x=$_POST[$x];
echo "$x";
}
-
Any recommendation on which is the best obfuscator software ?
-
Yes obfuscation. I just don't want some of the pages that link to jquery and ajax be easily extracted by viewing the source code. So any programme that does that ?
-
<form name="form" action="<?php print $PHP_SELF ?>" method="post">
<textarea name="descript" rows="3" cols="30">
<?php echo"$doing[intro]"; ?>
</textarea><br><br>
<input type="submit" name="intro" value="introduction"> key in your profile
</form><br><br>
<form name="form" action="<?php print $PHP_SELF ?>" method="post"><textarea name="descript" rows="3" cols="30"><?php echo"$doing[intro]"; ?></textarea><br><br><input type="submit" name="intro" value="introduction"> key in your profile</form><br><br>Is there a programme to make my code from multiple lines into one continuous straight line with no white space and paragraph ?
-
setTimeout and setInterval is almost the same. Is there any different ?
-
function Ajax(){
var xmlHttp;
try{
xmlHttp=new XMLHttpRequest();// Firefox, Opera 8.0+, Safari
}
catch (e){
try{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
}
catch (e){
try{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e){
alert("No AJAX!?");
return false;
}
}
}
xmlHttp.onreadystatechange=function(){
if(xmlHttp.readyState==4){
document.getElementById('innerscroll3').innerHTML=xmlHttp.responseText;
}
}
xmlHttp.open("GET","http://www.domain.org/chat3.php", true);
xmlHttp.send(null);
}
</script>
<br>
<div id="innerscroll3"></div>
function Ajaxa(){
var xmlHttp;
try{
xmlHttp=new XMLHttpRequest();// Firefox, Opera 8.0+, Safari
}
catch (e){
try{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
}
catch (e){
try{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e){
alert("No AJAX!?");
return false;
}
}
}
xmlHttp.onreadystatechange=function(){
if(xmlHttp.readyState==4){
document.getElementById('innerfetch').innerHTML=xmlHttp.responseText;
}
}
xmlHttp.open("GET","http://www.domain.org/chat4.php",true);
xmlHttp.send(null);
}
</script>
<div id="innerfetch"></div>
I have two ajax scripts on the same page. I got a result that only one is loaded and the other is not. How do i get two ajax to load on the same page ?
-
-
ajax is only activated when a user is filling up a form or some button is clicked. I needed a ajax script that auto refresh and get data on a portion of the page even if nothing is being moved, clicked or pressed on the computer. Any link to show ?
-
anyway thank for helping.
-
I think when the form called out open_win(), the $_REQUEST[cpid]; is empty so it reflect the empty value first instead of the value that passed from the form which is 2. Anyway to solve it ?
-
var val = "<?php Print $_REQUEST[cpid]; ?>";
The first attempt I clicked submit button the value passed to the function open_win.
To my surprise the first time "val" return as 0 in value.
The second attempt I clicked submit button the value of the first attempt is reflected out from "val"
Please help..
-
<script> function open_win() { window.open ("chats.php","mywindow","menubar=1,resizable=1,width=350,height=500"); } </script> <form name="form" method="post" onsubmit="return open_win();"> <select name="cpid"> <option value="2">2</option> </select> <input type="submit" name="talk" value="Chat"> </form>
Please help. I can't get the value $_POST[cpid] from chats.php.
-
thank you both..
PHP AJAX Loop Array send data
in Javascript Help
Posted
It always send the first row value from $doing["pid"];
I need it to send second, third or forth row if i click like the forth row of the check box.