use this:
if(empty($_GET))
{
//code
}
use this:
if(empty($_GET))
{
//code
}
put this
<img src="downArrow.gif">
in
<a href...></a>
and then use onclick function.....
hello...
Actually the $currentFile gives you the whole path of your file ,something like web/mysite/index.php
These two lines
#
$parts = Explode('/', $currentFile);
#
$pagename=$parts[count($parts) - 1];
to get out the pagename from the whole path...
Instead of this two lines code you can simply use this:
basename( $_SERVER["PHP_SELF"]);
Enjoy....
check these urls:
http://www.java2s.com/Code/JavaScript/Development/ProgressBar1.htm
http://www.javascriptkit.com/script/script2/progressbar.shtml
http://www.ebusinesshelpcenter.com/sitetools/process-progress-bar-free-javascript.php
http://www.knowledgebase.vunet.us/web/progressbar.html
http://www.webappers.com/2007/07/31/webappers-simple-ajax-progress-bar-with-css/
hello servis...
the following function will get your page name:
$currentFile = $_SERVER["PHP_SELF"];
$parts = Explode('/', $currentFile);
$pagename=$parts[count($parts) - 1];
echo $pagename;
And then, compare your required page name with $page name by using if condition, then make your table get highlighted...
by this:
<? if($pagename=="index.php"){?>
<li><a href="index.php" title="css menus" class="current" >Home</a></li>
<? } else {?>
<li><a href="index.php" title="css menus" >Home</a></li>
<? }?>
Hope this will help you for something...
yaa...
Java is java..
i agree with you...
Thank Shanti. Can u explain how can i use hidden variable in php.
see this example:
b>TicTacToe</b><br>
Enter Move X.<br>
<pre>
<form action="tictactoe.php" method="GET">
<input type="text" name="move" size=2>
0|x|2 <br>
_|_|_ <br>
3|4|o <br>
_|_|_ <br>
6|7|8 <br>
</pre>
<input type="hidden" name="board" value="0x234o678">
</form>
solved???
make this thread solved......
yes
like this:
window.location.href='updateReg.php?idValue='+idValue+'&idValue2='+idValue2;
How? LOL
see Marksolved link at top and bottom of this thread, then click on that...
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"> </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>
or check this attatchment...
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);
i don't get what you said..
Make me clear...
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>
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....
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..
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.
then make your thread solved....
all your code is perfect...
have you specified correct email id....
have you checked your email....
try it again....
have you tested your code at local or ftp????
Thank you very much for your help.
I managed to solve the problem my self.
tel me what your mistake????
please confirm that name(what you typed) is same as name in database....
or post your needed code...
echo $name;
tell me what it prints....
just echo this query like..
echo $result="update turf_table set number=(number+1) where name='.$name.'";
exit;
and copy and paste that query at your database..
tel me what you got there....
or post your table structure...
then write qury like:
$result="update turf_table set number=(number+1) where id='.$name.'";
you want add 1 to number or update number field with 1
i don't understand what do you want???
i think you are not complete with your posts.....
Please provide your thread clearly...
hello..
your 65th line should be:
<xml version="1.0" encoding="ISO-8859-1" >
simply... praveen's thought is correct...
And also check your style sheet attachment href=""...
sorryy....
not action "" filed...
im saying about your href="" field...
You sholud use either this:href="<?php echo PATH_CSS; ?>
or this: href="main.css"
not both...
i mean, action="" field takes two css file paths...
i think this line should not have two css paths..
<link rel="stylesheet" type="text/css" href="<?php echo PATH_CSS; ?>main.css" />
hello...have you checked it???
have you got solved your problem...???
if your problem is solved...then make this thread as solved...then others will see for it...
see this, i have modified your code..
it is working fine now...
and i have write some more piece of code where they have needed to come out from errors..
<<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="Small Corporation" />
<meta name="keywords" content="small, corporation" />
<link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
<!--
.style4 {color: #FFFFFF}
.style5 {color: #2D5181}
-->
</style>
</head>
<body>
<div id="contentcourse">
<div id="header"></div>
<ul id="menu">
<li><a class="current" href="index.php">Home</a></li>
<li><a href="aboutus.php">About Us</a></li>
<li><a href="courses.php">Courses</a></li>
<li><a href="demo_registration.php">Demo Class Registration</a></li>
<li><a href="faq.php">FAQ's</a></li>
<li><a href="order.php">How To Order</a></li>
<li><a href="payment.php">Payment Options</a></li>
<li><a href="enquiry.php">Enquiry</a></li>
<li><a href="contact.php">Contact Us</a></li>
</ul>
<div id="course">
<div id="title">
<h3>Sub Courses</h3>
</div>
<br/>
<?php
include("conn.php");
if(!empty($_GET['course']))
{
echo $course=$_GET['course'];
}else
$course='';
$query=("select course,subcourse from course WHERE course='".$course."'") or die(mysql_error());
$ress1=mysql_query($query);
while($rows=mysql_fetch_array($ress1))
{
$subcourse= $rows['subcourse'];
?>
<font color="#666666"> <a href="course.php?course=<?php echo $course ;?>&subcourse=<?php echo $subcourse ;?>" >
<?php
echo $subcourse;
echo "<br>";
?>
</a></font>
<?php
}?>
<?php if(!empty($_GET['course']))
{ $course=$_GET['course'];
}
if(!empty($_GET['subcourse']))
{
$subcourse= $_GET['subcourse'];
}
else $subcourse='';
$ress2=mysql_query("select * from course where subcourse='".$subcourse."'") or die(mysql_error());
while($rows=mysql_fetch_array($ress2))
{
$subcourse= $rows['subcourse'];
$fee= $rows['fee'];
$content= $rows['content'];
?><br />
<table width="85%" border="1" bordercolor="#CCCCCC">
<tr >
<td width="14%" height="40" ><strong>Course:</strong></td>
<td width="86%" ><?php echo $subcourse; ?></td>
</tr>
<tr>
<td height="39"><strong>Fee:</strong></td>
<td><?php echo $fee; ?></td>
</tr>
<tr>
<td height="210"><strong>Discription:</strong></td>
<td><textarea rows="13" cols="50"><?php echo $content; ?></textarea>
</td>
</tr>
</table>
<?php } ?>
<p> </p>
</div>
<div id="title1">
<h3 class="style5">Courses Offered</h3>
</div>
<div id="sidemenu">
<p>
<?php
$ress=mysql_query("select DISTINCT course …
so, you didn't get any data in $_GET;
tel me ,from where you are getting this variable..
or post needed code...
hello kishor..
echo this line and tel me wat u got:
echo $course=$_GET;
and also echo this statement:
echo $r="select * from course where course='".$course."'";
this line should be like this:
$query=("select * from course where course='".$course."'") or die(mysql_error());
i think you have to add one more column like month the you will calculate hours per month by using group by month column...
hello see this example will help you:
t1 table having 4 columns like year,month,day,points...
year month day points
2000 01 01 1
2000 01 20 3
2000 01 02 5
2000 02 23 10
then here im calculting total point per month...
here is the query:
SELECT year,
MONTH , sum( points ) AS points
FROM t1
GROUP BY year,
MONTH
it will print:
year month points
2000 01 8
2000 02 15
hello vssp...
there is a function called SUM in mysql to calculate total of any numerical column...and if you want to calculate per month,then use limit by 30 days...or created_date < last day of month...
see this link for your reference:
http://www.tizag.com/mysqlTutorial/mysqlsum.php