Shanti C 106 Posting Virtuoso
hello friends...
post me if any information...
plzzzzzzzzz...
see this link will help you:
http://www.phpnerds.com/article/using-cookies-in-php/2
Logic is same for cookies or sessions.
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."'";
try vBulletin
what do you expect from good forum creators???
use this code in your welcome page:
<?
session_start();
if(!isset($_SESSION['your_user_session']))
{
header("location:login.php");
}
?>
yes,there are somany hitcounters available on the internet..
see one of them:
http://www.doheth.co.uk/codelair/php-mysql/hit-counter
you just create a table with column like view..
the increment that column every time user visited your site like:
if(isset($_GET['view']))
{
$r="update viewtable set views=(views+1) ";
$r1=mysql_query($r);
}
header("location:yournextpage.php");
and use this:
<a href="www.yousite.com?view" >
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
It really depends on what you are trying to do, and versus what. MySQL versus Access? MySQL versus Oracle? MySQL versus DB2? MySQL versus a spreadsheet? MySQL is good for web apps, integrates nicely with PHP, and as its community server is free
There are really no disadvantages to using a database. I use a MySQL database and PHP to interpret the information. The advantages of a database are numerous.
1. You can keep a LOT of information strored for your website in a database and have it accessed as needed. For instance, someone can search your database for a certain item, name, etc.
2. You can store actual HTML pages in the database so instead of making 10 html pages, you create one PHP page and pull the data needed pertaining to the users criteria.
3. You can not only store information, but sort it as well. For instance, get information for a certain state or person only.
The best way to describe a database is its like a telephone book. The book is the database, the whitepages are a table and the listings are rows in the table. So, you would have a column for lastname, first name, address, city, state, zip, etc. Then each persons information is added to the table row. Then, if someone wants listings for Jones, the PHP pulls the last names that match Jones and all the information associated with it. Or just the letter L and so on.
The phone book is just an example and it can apply to just about anything. A clothing store, cd collection, etc.
In conclusion, its an awesome web tool for any site and its well worth looking into. I would suggest using …
i think it is difficult to remeber ordered details for somany days using sessions...
i mean:
we can use sessions to store our order details temporarily ..means we can use sessions instead of inserting them into temporders table...
i think it is difficult to use sessions to store whole ordered details for so many days....
Finally what i wan to tell is:
we can use sessions upto add an item to cart,,then next it is difficult....
Any other smart opinions will be appreciated...
i think the last line is not correct...
try instead:
echo "<textarea name='txtComments' rows='2' cols='20' id='txtComments'><?php echo $comments ?></textarea>";
textarea doesn't have value attribute...
By HTML and CSS you can design a good web site ...
i think these are essential an enough...
but for your logos and some buttons ,you have to know the photoshop...And need flash to show aour site little bit better...but it takes time to load...
Hello...
Hope i will get right answers here...
One day i have found that ,some of my web page content changed by unknowns .
I really shocked about that..
Can any know how to prevent our web pages content to be changed and how is it possible???
Thanks in advance..
shanti
echo $s="SELECT * FROM test_table";
$sql = mysql_query($s);exit;
then see what echoed in your page...and execute that query in your database...then we will get what the error..
other wise go for another option...
reply with what happened...
On the same server just do this:
SELECT dbname.tablename.columnname,db2name.table2name.column2name FROM
dbname.tablename, db2name.table2name;
(I think you get the idea)
As far as I know you can't select data across multiple servers.
try this:
$query2 = "SELECT * FROM students WHERE highschool ='".$row['highschool']."' ORDER BY lastname";
yes...
do more on css.you will get pretty website ..
reach google...
Please read about "FileSystemObject".
Find files with JavaScript
http://www.codeproject.com/jscript/search_in_files.asp
JScript FileSystemObject Object
http://ns7.webmasters.com/caspdoc/ht...ect_object.htm
Current Directory
http://javascript.internet.com/navig...directory.html
Scripting.FileSystemObject Examples
http://www.eggheadcafe.com/articles/20030627b.asp
And also check this:
http://javascript.internet.com/navigation/current-directory.html
Refer this url:
http://www.white-hat-web-design.co.uk/articles/php-captcha.php
And for more, as someone said goooogle is your friend...
this error will occur at the times of:
1.any space is there before the session_start(); function..Means it sholu be the first line of your application...
2.dont use session_start(); as twice (in your main application and in your included application)
You could use DATE_ADD/DATE_SUB such as ADDDATE/SUBDATE and SUBTIME, but that's only available since MySQL 4.1.1.
check this:
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
you mean...how to make a flash player...
make your thread more understandable...
then write select instead of delete,which i have posted above.....
or simply remove delete query..try with only select...
use varchar data type...
see an example:
DELETE tablename
FROM tablename,
(SELECT MAX(uid) AS dupid,COUNT(uid) AS dupcnt
FROM tablename
GROUP BY id,url HAVING dupcnt>1)
AS dups
WHERE tablename.uid=dups.dupid;
Here is an example:
uid id url
1 20 google.com
2 25 yahoo.com
3 20 google.com
4 25 yahoo.com
5 20 google.com
The above query would delete uid 4 and 5 on the first run and ui 3 on the second run.
i think this code will help you...
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script>
function generateRow() {
var d=document.getElementById("div");
d.innerHTML+="<p><input type='text' name='food'>";
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<label>
<input name="food" type="text" id="food" />
</label>
<p>
<input name="food" type="text" id="food" />
</p>
<p>
<input name="food" type="text" id="food" />
</p>
<div id="div"></div>
<p><input type="button" value="Add" onclick="generateRow()"/></p>
<p>
<label>
<input type="submit" name="Submit" value="Submit" />
</label>
</p>
</form>
</body>
</html>
try this code:
session_start();
session_unregister('uname');
session_destroy();
header ("Location: login.php");
i think,its not possible because of auto incremented one....
hey you have to make some design with text boxes for entering user data..and insert them in a data base table...and then provide login to them by checking database values...using mysql queries...
or see here for free scripts online:
http://php.about.com/od/finishedphp1/ss/php_login_code_2.htm
http://www.phpjunkyard.com/
Simply ...Remembering our values for different web pages...