urtrivedi 276 Nearly a Posting Virtuoso

post/attache your whole code.

urtrivedi 276 Nearly a Posting Virtuoso
var total=0;
for (i=1;i<=15;i++)
{
  total+=parseFloat(document.getElementById('label'+i).innerHTML); 
}
document.getElementById(label3).innerHTML = total;
urtrivedi 276 Nearly a Posting Virtuoso

at the end of calculate function you may add code

FUNCTION CALCULATE
{
.
.
.
.
     document.getElementById(label1).innerHTML = cost;

     document.getElementById(label3).innerHTML = parseFloat(document.getElementById(label1).innerHTML) + parseFloat(document.getElementById(label2).innerHTML);
}
urtrivedi 276 Nearly a Posting Virtuoso

I am not sure about scalar error. Database design has nothing to do with store procedure error. But If you have kept postcode as unique and you trying to insert it twice then it will not allow you.

urtrivedi 276 Nearly a Posting Virtuoso

comment line 11 and write the line i have given below

--SELECT @houseAddressID FROM HouseAddress WHERE HouseAddress.postCode = @postCode
set @houseAddressID = SCOPE_IDENTITY()
urtrivedi 276 Nearly a Posting Virtuoso
<?php if($mydata>0)  { ?>
<tr style='display:inline'>
<td> this is visible</td>
</tr>

<?php
}
else
{
?>
<tr style='display:none'>
<td> invisible</td>
</tr>

<?php
}
?>
urtrivedi 276 Nearly a Posting Virtuoso

You need to learn about "limit" clause of mysql

in user form

.
.
.

<input type=hidden name=page value=<?php echo $_REQUEST['page'];?> >
</form>

in query

$recperpage=10;
if ($_REQEUST['page']=="")
   $_REQEUST['page']=0;
$startfrom=$_REQEUST['page']*$recperpage;

$query=" SELECT * FROM kiniseis 
 order by date {$_REQUEST['dateorder']} 
 limit {$startfrom},{$recperpage} ";
urtrivedi 276 Nearly a Posting Virtuoso

search in your computer some where in program files or anywhere else

urtrivedi 276 Nearly a Posting Virtuoso

rename your table order to ORDERS, keyword may creating some problem

urtrivedi 276 Nearly a Posting Virtuoso

search on your computer for php.exe
you browse to the path or your php.exe files path
then give other inputs
at the end open for advance settings

then "c:\some path\php.exe"
will come add your script name to the end like
"c:\some path\php.exe" "c:\wamp\www\mysite\mycron.php"

press apply

urtrivedi 276 Nearly a Posting Virtuoso

Ardav is right, thanks for stopping things here

urtrivedi 276 Nearly a Posting Virtuoso
urtrivedi 276 Nearly a Posting Virtuoso

where is your kalpan/email folder on your hard disk, find it and post the path here.

urtrivedi 276 Nearly a Posting Virtuoso

You might be storing your webpage folder on physcial location say

apache root
c:\program files\apache2\htdcos\

and you may be access it in browser
like
http://localhost/

for cron job you may place your file anywhere in your harddisc, you may also keep it in folder in apache root

urtrivedi 276 Nearly a Posting Virtuoso

You write your php script say mycron.php. Then in windows start/programs/accessories/system tools/schedule task, add one task
you may give direct command like

php.exe "c:\apache\htdocs\myweb\myfolder\mycron.php?mypara=1"

you may set time, give userid password.

now windows will take care of rest things

urtrivedi 276 Nearly a Posting Virtuoso

I have made few change in your code. I hope it will work as expected.

page 1, line 8

$i=0; 
while.....

page 1, line 10
changed only portion of check box element, removed id=checked[] and added value attribute

<input name="checked[]" type="checkbox" value="'.$i++.'" />

page 2, line 7 and 8

$model_name = $model[$checked[$i]];
	$model_prices = $model_price[$checked[$i]];
urtrivedi 276 Nearly a Posting Virtuoso

I dont know what you are asking for but I guess that you want to set selection box to the value selected by user. you may achive it using following code

<option value ="date.php?dateorder=asc" 
<?php echo ($_REQUEST['dateorder']=='asc')?"selected":"";?> >ASC</option>    
<option value ="date.php?dateorder=desc" 
 <?php echo ($_REQUEST['dateorder']=='desc')?"selected":"";?> >DESC</option>
urtrivedi 276 Nearly a Posting Virtuoso

YOU may try following query

SELECT a.b_id, a.company_name AS name, a.ceo, a.founded, a.website, b.year, 
sum(case when b.year=2006 then b.earnings else 0 end ) y2006,
sum(case when b.year=2007 then b.earnings else 0 end ) y2007,
sum(case when b.year=2008 then b.earnings else 0 end ) y2008,
sum(case when b.year=2009 then b.earnings else 0 end ) y2009
FROM business a left outer JOIN earnings b on a.b_id=b.b_id 
group by a.b_id, a.company_name, a.ceo, a.founded, a.website ORDER BY (founded)
urtrivedi 276 Nearly a Posting Virtuoso

To me it seems to be fine. You may continue using this design. You may join tables using following query

select a.company_id, a.company_name ,a.CEO, a.Founded, a.Website,  a.Share_Price ,
b.year, b.earning
from company a left outer join earnings b on a.company_id=b.company_id
urtrivedi 276 Nearly a Posting Virtuoso
select count(*) from information_schema.tables where table_name='SEARCH_TABLE_NAME' AND TABLE_SCHEMA='SEARCH_DATABASE_NAME'

OR
If you want to create new table you may also use

create or replace syntax........

urtrivedi 276 Nearly a Posting Virtuoso
<?php
  $query="select * from table order by date {$_REQUEST['qryorder']}";
.
.
.
.
.
.
?>

<form name=frm action='thispage.php'>
<select name=qryorder onchange='document.frm.submit()'>
<OPTION VALUE='asc'>Ascending
<OPTION VALUE='desc'>Descending
</SELECT>
</form>
.
.
.
.
.

or

<?php
  $query="select * from table order by date {$_REQUEST['qryorder']}";
.
.
.
.
.
?>

<a  href='thispage.php?qryorder=asc' >Ascending order</a>
<a  href='thispage.php?qryorder=desc' >Descending order</a>
.
.
.
..
urtrivedi 276 Nearly a Posting Virtuoso

post your table structure and sample data, then let us know which table you want to update from which table, every week.

urtrivedi 276 Nearly a Posting Virtuoso

1) at line 18 add following line

echo $sql;

copy the dynamic query from browser and run it in mysql client or phpmyadmin what ever you are using, now see the result.

2) change line no 22 as given

if ( mysql_result($rs,0,"empid") =$id )
urtrivedi 276 Nearly a Posting Virtuoso

select max(invoiceno) from bill
OR
You may set invoiceno column to AUTO_INCREMENT in MYSQL, it will automatically insert new id.

urtrivedi 276 Nearly a Posting Virtuoso

use == for comparision at line no 28
(++$i % 2) == 0

urtrivedi 276 Nearly a Posting Virtuoso
<html>
<script lang='javascript'>
function onselectchange()
{
        document.formname.textboxname.value = document.formname.selelistname.options[document.formname.selelistname.selectedIndex].text;
}
</script>
<form name=formname>
<input type=textbox name=textboxname id=textboxname  >
<select name=selelistname onchange='javascript:onselectchange();'>
<option value='1'/>one
<option value='2'/>two
<option value='3'/>three
</select>
</form>
</html>
urtrivedi 276 Nearly a Posting Virtuoso

eval is used to execute dynamic statement. like eval("\$var=7;");. It is not a fuction so the way you are using it is not correct. if you want to use variable value as variable name then you may use $$$... sign. as shown below.

<?php
$var1 = 'lol';
$var2 = 'var1';
//$var3 = eval("\$var2;");
$var3 = $$var2;

print $var3;
?>
urtrivedi 276 Nearly a Posting Virtuoso

My mistake, here is the changed version

select  sellerid, count(*) nooftimes 
from sales 
where buyerid='$buid'
group by sellerid, buyerid 
order by buyerid,nooftimes desc, sellerid
limit 0,1
urtrivedi 276 Nearly a Posting Virtuoso
select  sellerid, count(*) nooftimes 
from sales 
where buyerid='$buid'
group by sellerid, buyerid 
order by sellerid,buyerid,nooftimes desc 
limit 0,1

$cnt[0] will return you sellerid
$cnt[1] will return you nooftime

urtrivedi 276 Nearly a Posting Virtuoso

check your functions in a separte file
say test.php

<?php
include "functions.php";
echo getsig('someuid')."<br>";
echo getprofile('someuid');
?>

see whether it is giving propers output or not.

urtrivedi 276 Nearly a Posting Virtuoso
<html>
<script lang='javascript'>
function gotolink(link)
{
	window.location=link.value;	
}
</script>
<body>
<form name='frm'>
<select name=sel onchange='javascript:gotolink(this)'>
<option value='http://www.yahoo.com' />yahoo
<option value='http://www.timesofindia.com' />times of india
</select>
</form> 
</body>
</html>
urtrivedi 276 Nearly a Posting Virtuoso

at your line number 13, add one line as shown below

$_POST['Belopp']=$avrundat;
urtrivedi 276 Nearly a Posting Virtuoso

Best way is to save information linkwise and datewise

linkname varchar(255) //
trans_date date
total integer

when ever some link is opened insert/update above table. if date,link combination does not exist then insert it else update total=total+1

now for reporting periodwise is very easy say if you want monthwise

select  date_format(trans_date,'%b-%Y') month , sum(total) total from table group by date_format(trans_date,'%b-%Y') where date_format(trans_date,'%b-%Y')='AUG-2009' and linkname='www.mysite.com/myfolder/mypage.php'

you can find out various required option by looking into date_format() manaul.

urtrivedi 276 Nearly a Posting Virtuoso
select order,comment_no, note from orders a inner join (select order, max(comment_no) comment_no from orders GROUP BY order) b
on order=b.order and a.comment_no=b.comment_no
urtrivedi 276 Nearly a Posting Virtuoso
<html>
<script lang='javascript'>
var total=0;
function findtotal(flag,value1)
{
	if (flag)
	   total=total+parseInt(value1, 10);
	else
	   total=total-parseInt(value1, 10);
	document.frm.total.value=total;
}
</script>
<body>
<form name=frm>
Cars <input type=checkbox value=2000 onclick="javascript:findtotal(this.checked,this.value)"><br>
Rendtv <input type=checkbox value=20 onclick="javascript:findtotal(this.checked,this.value)"><br>
Blah<input type=checkbox value=2590 onclick="javascript:findtotal(this.checked,this.value)"><br>
<input type=text readonly name=total id=total >
</form>
</body>
</html>
urtrivedi 276 Nearly a Posting Virtuoso

place following lines in the begining of the page after first <?php tag.

error_reporting(E_ALL); 
ini_set("display_errors", 1);

when you run it will show so many warning and error messages. look what is the last error message. post that error message here.

urtrivedi 276 Nearly a Posting Virtuoso

You try to run your <select> </select> code in separte php file. see whether there list box is loading properly.

Output may have stoped due to some error in accessing $Qry1 object/

urtrivedi 276 Nearly a Posting Virtuoso

you can not use php tags inside php code
AT line number 171 CHANGE <?PHP TO END;

AT Line number 188 change ?> to print <<<END

urtrivedi 276 Nearly a Posting Virtuoso
<?php
	$rows=5;
	print "<table border=0>";
	for($i=0;$i<$rows;$i++)
	{
		print "<tr>";
		for ($j=0;$j<=$i;$j++)
		{
			print "<td >".$i*$j."</td>"	;
		}
		print "<tr>";
	}
?>
urtrivedi 276 Nearly a Posting Virtuoso

post your whole code.
select your code and wrap using code tag, press '#' button given.

urtrivedi 276 Nearly a Posting Virtuoso

in your pdf.php file add both lines. it will display error description with line number.
error_reporting(E_ALL);
ini_set("display_errors", 1);

then I am not sure about line number
122-124. I think you should not echo anything while creating a pdf file. you should concat this lines with variable, $pdfcode.

Also remove any blank line before <?php tag or after ?> tag.

comment following lines. and any other print/echo statment you are using in pdf generation.

echo '<html><body>';  
echo trim($pdfcode);  
echo '</body></html>';
urtrivedi 276 Nearly a Posting Virtuoso

use braces {} around php variables like shown below

print "<option value=\"{$SourceID}\" {$selected}> {$ItemName} </option>";

urtrivedi 276 Nearly a Posting Virtuoso

what do mean by not working? syntax, query or what?

urtrivedi 276 Nearly a Posting Virtuoso

You are trying to manage multiple record at the same time. Do not use such logic.
instead pass categoryid at a time. and manage one record at a time. I could not explain here what ever you expect because you are going in the totally wrong direction.

urtrivedi 276 Nearly a Posting Virtuoso

if you want more than one trailing or leading spaces then "&nbsp;" is the only way to do it.

urtrivedi 276 Nearly a Posting Virtuoso

for that you have to bring all element in one form. here you action page is purchase1.php, you should merge all forms into one which are calling purchase1.php.

You can use separate form if you want to call script other than purchase1.php.

urtrivedi 276 Nearly a Posting Virtuoso

you forget about the automatic things.
YOu simply write script to check records where current date is greater than expiry date in user table.
then for those records send mail to user and update their status from gold to bronze.

AFter you complete this script tell your administrator or webmaster to run this script every day. he/she will schedule your script to run daily.

urtrivedi 276 Nearly a Posting Virtuoso

You can not submit multiple form at the same time. for that you need to use hidden elements. So before submitting form, you need to fill these hidden elements with required data from other forms.

urtrivedi 276 Nearly a Posting Virtuoso

[ C O D E ]

WRITE YOUR CODE here

[ / C O D E ]
do not use space in [ c o d e ] as i have used

urtrivedi 276 Nearly a Posting Virtuoso

when some ones login into your system. Determine the access level and store it in a session varaible.
then whereever you are querying your database you may write follwoing code.

if($_SESSION['accesslvl']=1) //for example 1 is for admin

      $query="SELECT * FROM clients WHERE client_id = $client_id";
else //otherwise
      $query="SELECT * FROM clients WHERE user_id = $user_id AND client_id = $client_id"