Shanti C 106 Posting Virtuoso

welcome....:)

Shanti C 106 Posting Virtuoso

i have modified your code..
and its working now:

<?php
$host="localhost"; // Host name
$username="root"; // Mysql username
$password="1234"; // Mysql password
$db_name="opulent_online1"; // Database name
$tbl_name="users"; // Table name
// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
if($_SERVER['REQUEST_METHOD']=='POST')
{
if(isset($_POST['check_compare']))
{
$sql = "DELETE FROM $tbl_name WHERE find_in_set(uid,'".$_POST['check_compare']."')";
$result = mysql_query($sql);
}
}

$sql="SELECT * FROM $tbl_name";
$result=mysql_query($sql);
$count=mysql_num_rows($result);
?>
<?
// Check if delete button active, start this



?>
<script>
function comparision(){
		d=document.form1;
		var total="";
		if(!d.c.length){
			if(d.c.checked) {
				d.check_compare.value=d.check_compare.value+d.c.value+',';
				return true;
			} else {
				alert("Please select check Box");
				return false;
			}		
		}
		for(var i=0; i < d.c.length; i++){
			if(d.c[i].checked) {
				total +=d.c[i].value + "\n";
				d.check_compare.value=d.check_compare.value+d.c[i].value+',';
			}
		}
		if(d.check_compare.value=="") {
		 alert("Please select atleast one check Box");
		 return false;
		}
	}
</script>
<table width="400" border="0" cellspacing="1" cellpadding="0">
<tr>
<td><form name="form1" method="post" action="deleterows.php"onSubmit="return comparision()">
		<input type="hidden" name="check_compare">
<table width="400" border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td bgcolor="#FFFFFF">&nbsp;</td>
<td colspan="4" bgcolor="#FFFFFF"><strong>Delete multiple rows in mysql</strong> </td>
</tr>
<tr>
<td align="center" bgcolor="#FFFFFF">#</td>
<td align="center" bgcolor="#FFFFFF"><strong>Id</strong></td>
<td align="center" bgcolor="#FFFFFF"><strong>Name</strong></td>
<td align="center" bgcolor="#FFFFFF"><strong>Lastname</strong></td>
<td align="center" bgcolor="#FFFFFF"><strong>Email</strong></td>
</tr>
<?php
while($rows=mysql_fetch_array($result)){
?>
<tr>
<td align="center" bgcolor="#FFFFFF">
<input type="checkbox" name="c" value="<?=$rows['uid'];?>" id="c"/>
</td>
<td bgcolor="#FFFFFF"><? echo $rows['uid']; ?></td>
<td bgcolor="#FFFFFF"><? echo $rows['name']; ?></td>
<td bgcolor="#FFFFFF"><? echo $rows['utype']; ?></td>
<td bgcolor="#FFFFFF"><? echo $rows['uemail']; ?></td>
</tr>
<?php
}
?>
<tr>
<td colspan="5" align="center" bgcolor="#FFFFFF">
  
 <input name="compbutton" type="submit" class="Button" value="Compare" /></td>
</tr>

</table>
</form>
</td>
</tr>
</table>
Shanti C 106 Posting Virtuoso

or check this attatchment...

Shanti C 106 Posting Virtuoso

hello try this code once:

$photo= imagecreatefromjpeg($image_file);
$fotoW = imagesx($photo);
$fotoH = imagesy($photo);

$photoFrame = imagecreatetruecolor(600,338);

$logoImage = imagecreatefrompng('logo.png');
imagecopyresampled($photoFrame, $photo, 0, 0, 0, 0, 600, 338, $fotoW, $fotoH);


$logoW = imagesx($logoImage); 
$logoH = imagesy($logoImage); 

imagecopy($photoFrame, $logoImage, 0, 0, 0, 0, $logoW, $logoH);

imagejpeg($photoFrame, '', 100);
Shanti C 106 Posting Virtuoso

ok.......

Shanti C 106 Posting Virtuoso

Google is Google...

Shanti C 106 Posting Virtuoso

i don't get what you said..
Make me clear...

Shanti C 106 Posting Virtuoso

some thing goes like that....

<table width="30%" border="0" background="some.gif">
  <tr>
    <td colspan="2" ><? echo $row['name'];?></td>
  </tr>
  <tr>
    <td colspan="2"><? echo $row['identity'];?></td>
  </tr>
  <tr>
    <td ><img src="<?=$row['identity'];?>" /></td>
	<td><? echo $row['posts'];?></td>
  </tr>
</table>
Shanti C 106 Posting Virtuoso

hello nikesh...

that image having a back ground image is same for all...
and the text (name,posts,solved threads) will coming from database and also an image of ours(avatar)...
i think nothing hard to do this....

nikesh.yadav commented: nice helper, great hardworker ..... you are +1
Shanti C 106 Posting Virtuoso

i think you can't use a php variable in a html file...
If you want send some value from php file to html file, then put it in hidden variable at php file , and send it to html file..

Shanti C 106 Posting Virtuoso

curd rice...

Shanti C 106 Posting Virtuoso

For web development , dotNet is the best.....
Java is heavily used throughout the industry. It is now open source so does not depend on Sun alone anymore.
Advantage of Java is that it can run anywhere while Microsoft stuff only runs on MS systems.

Shanti C 106 Posting Virtuoso

dual

Shanti C 106 Posting Virtuoso

I am faster than you...

Shanti C 106 Posting Virtuoso

null

Shanti C 106 Posting Virtuoso

Stupids are increases day by day!!!!!!

Shanti C 106 Posting Virtuoso

"Mistakes increases your experience & Experience decreases your mistakes...You learn from your mistakes, Then other sill learn from your SUCCESS..."

Shanti C 106 Posting Virtuoso

hello, here i have written js code for validating your unit field and radio buttons...
and write remaining code by your self....

<script type="text/javascript">

function formValidator(){

	var d=document.valform;
	if(trimstr(d.unitnum.value)=="")
	 {
	alert("Please enter a valid unit number");
	d.unitnum.focus();return false;
	}
		if(d.campus1.checked==false && d.campus2.checked==false && d.campus3.checked==false) {
		alert("Please check atleast one  radio button!!");
		d.campus1.focus();
	     return false;
	}
  	
}
function trimstr(str) {
	str= this != window? this : str;
	return str.replace(/^\s+/g, '').replace(/\s+$/g, '');
}
</script>
Shanti C 106 Posting Virtuoso

hello
try this instead of your 87th line:

if(!empty($_POST['master_id']))
Shanti C 106 Posting Virtuoso

sell

Shanti C 106 Posting Virtuoso

hell

Shanti C 106 Posting Virtuoso

cell

Shanti C 106 Posting Virtuoso

tall

Shanti C 106 Posting Virtuoso

mall

Shanti C 106 Posting Virtuoso

can
any
many

reckoned

Shanti C 106 Posting Virtuoso

male

Shanti C 106 Posting Virtuoso

ASU

Shanti C 106 Posting Virtuoso

rate

Shanti C 106 Posting Virtuoso

undertime

php or dot net

Shanti C 106 Posting Virtuoso

National Treasure

Shanti C 106 Posting Virtuoso

Farmer is a real wise hardworker.

Shanti C 106 Posting Virtuoso

Heat, Ten , Hence...

playstation

Shanti C 106 Posting Virtuoso

sweet.

i never believe in _____________.

Shanti C 106 Posting Virtuoso

-1007

Jamsbond 007
he he he....

Shanti C 106 Posting Virtuoso

collection -> coins collection

Shanti C 106 Posting Virtuoso

late

Shanti C 106 Posting Virtuoso

look like a

Shanti C 106 Posting Virtuoso

NO
NO
NO

Shanti C 106 Posting Virtuoso

Do Good And Forgot It....

Shanti C 106 Posting Virtuoso

then make your thread solved....

Shanti C 106 Posting Virtuoso
select * from table where c_id like  '% 4%';
Shanti C 106 Posting Virtuoso

all your code is perfect...
have you specified correct email id....
have you checked your email....
try it again....

Shanti C 106 Posting Virtuoso

have you tested your code at local or ftp????

Shanti C 106 Posting Virtuoso

Thank you very much for your help.

I managed to solve the problem my self.

tel me what your mistake????

Shanti C 106 Posting Virtuoso

please confirm that name(what you typed) is same as name in database....
or post your needed code...

Shanti C 106 Posting Virtuoso
echo $_POST['sel_id'];exit;

see what it prints...

Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso

carry on....

Shanti C 106 Posting Virtuoso

hello dickersonka and pritaeas...
Please give clear explanation about mysql indexing...how to use??

Thanks in advance...

Shanti C 106 Posting Virtuoso

hello anuj..
if you want to store images into your database...
Its very best thing to store image path to database and store image into a folder....
Then retrieve that image whanever you want...
For this follow this tutorial:
http://www.php-mysql-tutorial.com/php-mysql-upload.php