in your login.php , add 2 line before if function, do it show 1 or not
$row=mysql_num_rows($result);
echo "total rows ->" .$row "<-";
die('stop');
if($row==1)
in your login.php , add 2 line before if function, do it show 1 or not
$row=mysql_num_rows($result);
echo "total rows ->" .$row "<-";
die('stop');
if($row==1)
function validate(form, minlength, maxlength)
{
var userInput = form.elements[0].value
if(userInput.length >= minlength && userInput.length <= maxlength)
{
return true;
}
else
{
alert("Please input between " + minlength + " and " + maxlength + " characters");
return false;
}
} <-- this is missing
i think, dont use header, just print json_encode
apphp data grid is one avaialble tool
I think you should have posted this topic to business exchange forum, You wil find good responder in that forum.
what error u getting
You can do this by using php code,
First you have to loop through attribute table and create dynamic query.
Then exucute that query to get the desired result
select ProductID , max(case when AttributeID=1 then AttributeValue else null end) Color
, max(case when AttributeID=2 then AttributeValue else null end) Size from tblProductAttribute
group by ProductID
yoru query is fine for that purpose, so what your query do not show or what wrong it shows?
what is ur target, what u want to achive
union will merge 2 result in one, if common rows showed only once
SELECT * FROM `Cater Gid` where Cater like '%$term' UNION SELECT * FROM `Cater Food` where Cater like '%$term'
you forgot single qute near like word on right side
remove quotes around
i dont think so, on web devlpment link on top
if you click it,
then there is blue button lauch chat room.
I guess, its allowd for all users.
but your query is having problem,
copy it from queto to quote, and run it in phpmyadmin,
see error and solve that mysql error first
u can chat on web development room, i m there if u wish
what error it gives?
can u paste sturcture of both table here
cater gid and cater food, must have same number of columsn and of same data type.
If it is not the case
then select column name properly in both queries
$sql = mysql_query("SELECT * FROM `Cater Gid` where Cater like '%$term UNION SELECT * FROM `Cater Food` where Cater like '%$term") ;
You need to focus on javascript /jquery to make it user interactive.
Php will play role at the time of loading or saving from /to server.
I suggest simple keep name tag as following for all file input elements, do not give number in html form. This way you will get file upload array in upload_file.php. you can user var_dump to see how file array is built. Accordingly you can write your code.
name="userfile[]" ;//correct
name="userfile['01']" ; not good practice
create 2 dimentional array
$ar[0][0]='Driver`s seat';
$ar[0][1]='';
$ar[0][2]='';
$ar[0][3]='';
$ar[0][4]='';
$ar[1][0]='1';
$ar[1][1]='2';
$ar[1][2]='';
$ar[1][3]='3';
$ar[1][4]='4';
$totrows=count($ar);
echo "<table>";
for ($i=0;$i<$totrows;$i++)
{
echo "<tr>";
for($j=0;$j<5;$j++)
echo "<td>".$ar[$i][$j]."</td>";
echo "</tr>";
}
echo "</table>";
www.ccavenue.com
In case of oracle/mysql you can do following and even in mssql
select MatchId
, sum(case when SelectionName='Home win' then Odds else 0 end )home_win
, sum(case when SelectionName='Draw' then Odds else 0 end ) draw
, sum(case when SelectionName='Away win' then Odds else 0 end )away_win
, sum(case when SelectionName='Under 2.5' then Odds else 0 end ) under_25
, sum(case when SelectionName='Over 2.5' then Odds else 0 end ) over_25
group by matchid
You can use vlookup function for the same purpose
I have changed some lines in your searchform.html.php
1) I created javascript searchorprint function
2) I named form as frm
3) I changed type from "submit" to "button"
4) on click on button I called function searchorprint
<?php
include '../templete/header.php';
?>
<script language="javascript" type="text/javascript">
function searchorprint(type){
if(type=='s')
{
document.frm.action='view.html.php';
document.frm.submit();
}
if(type=='p')
{
document.frm.action='print.html.php';
document.frm.submit();
}
}
</script>
<div>
<h6>Sales Report by Main Vendor</h6>
</div>
<form action="" method="POST" name='frm' id='frm' >
<table class="tdtable" id="tdtable">
<tr>
<td>Main Vendor Name </td>
<td>
<select name="mvendor" id="mvcode"><option value="">Mian Vendor</option>
<?php foreach ($mvcode as $mvcodes): ?>
<option value="<?php htmlout($mvcodes['MVCode']); ?>">
<?php htmlout($mvcodes['MVName']); ?></option>
<?php endforeach; ?>
</select>
</td>
</tr>
<tr>
<td>Date[From]:</td>
<td><input type="text" id="datepicker1" name="datefrom" /></td>
</tr>
<tr>
<td>Date[To]:</td>
<td><input type="text" id="datepicker2" name="dateto" /></td>
</tr>
</table>
<div>
<input type="button" value="Search" name="search" onclick="javascript:searchorprint('s')">
<input type="button" value="Print" name="print" onclick="javascript:searchorprint('p')">
</div>
</form>
on refresh post data will remain same and even not empty, because on refresh same data will be resubmitted,
One solution is to use cookie.
See my previous reply to this thread
You can put it in some common page that you include in all your pages. I am not sure about putting in tomcat configuration
In login page you can check time if userid password is fine and time is between 05:00hr to 10:00 hr, allow user to access pages otherwise disallow
If there is no login page. You may put same check in all pages
Such things happens in self submitting page.
I used cookies to solve this kind of problem.
for example when user clicks save before submitting set one cookie say "saveinfo" to 1 , using javascript,
Now along with isset using php $_COOKIE['saveinfo'] ==1,
in the end of page using javascript again to set saveinfo to 0,
in begining of index.php, you may add this 2 line and run your page, you may able to see any error if it is there.
error_reporting(E_ALL);
ini_set("display_errors", 1);
Adobe acrobat professinal allows you to edit using touch up text tool. You can not format like word doucment but minor changes can be done easily.
Acrobat Reader will not allow.
I am not sure about any other pdf editor software
change line 69 in your first post
from
`post_date` AS `date`
to
DATE_FORMAT(`post_date`, '%a., %b %D, %Y %l: %i %p') AS `post_date`
select
tbl_centre.centre_id,
tbl_centre.centre_no,
tbl_centre.centre_name,
tbl_region.region,
tbl_net.qualification,
sum(CASE WHEN tbl_net.qualification=0 THEN 1 ELSE 0 END ) QUALS,
sum(CASE WHEN tbl_net.qualification=1 THEN 1 ELSE 0 END ) AWARDS,
from
tbl_centre
left join
tbl_net_centre ON tbl_centre.centre_id = tbl_net_centre.centre_id
left join
tbl_net ON tbl_net_centre.ntwrk_cd = tbl_net.network_code
left join
tbl_region ON tbl_centre.region_code = tbl_region.region_ID
where
tbl_centre.reg_status = 'R'
and
tbl_net_centre.net_reg_stts in ('R','P')
and
tbl_region.region_ID ='3'
group by tbl_centre.centre_id
HAVING IFNULL(sum(CASE WHEN tbl_net.qualification=0 THEN 1 ELSE 0 END ),0) >0 AND
IFNULL(Sum(CASE WHEN tbl_net.qualification=1 THEN 1 ELSE 0 END ),0) > 0
limit 1000;
out of all this code (in your first post here), also post code which you use to call all that functions, and which pariticular function gives you date in default format.
give your sample data also for some records, so that we can understand what data your columns hold,
$sql = "SELECT 'nom' FROM test WHERE coord='$coord'";
$req = mysql_query($sql) or die('Erreur SQL !'.$sql.'<br>'.mysql_error());
$row=mysql_fetch_assoc($req);
echo $row['nom'];
<?php
$pass="80"; //this you can pass from html form to the query
$query="select sum(case when percentagescore>='$pass' then 1 else 0 end ) / count(*)*100 pass_percent,
sum(case when percentagescore<'$pass' then 1 else 0 end ) / count(*)*100 fail_percent
from tablename";
?>
Cookie is passed from server, when u set cookiejar, you are specifying cookie file for that session,
to request other things in same session, the curl must know the session cookie, so all next time we use cookiefile option to read same cookie file.
Nothing to do with id and all
There are others problems in your, first you can not use "return" as name of any html item, its gives error
second you dont have any bottles html anywhere, so in price function I commented first 3 lines to test my code.
function Price(data) {
//document.getElementById("productprice").value = data.options[data.selectedIndex].id;
//newValue = (parseInt(document.form.bottles.value) * parseInt(document.form.price.value));
//document.form.total.value = newValue;
var w = document.getElementById("product").selectedIndex;
var str=document.getElementById("product").options[w].text;
var n=str.split(":");
document.form.quantity.value = n[1];
}
Actually I wanted your html code ,
you run ur page, then right click, view source, copy that source and paste it here
<iframe width="450" height="350" src="http://www.youtube.com/embed/sqzSlbZ4BCE" frameborder="0" allowfullscreen></iframe>
What sql you writing and what error are u getting.
function Price(data) {
document.getElementById("productprice").value = data.options[data.selectedIndex].id;
newValue = (parseInt(document.form.bottles.value) * parseInt(document.form.price.value));
document.form.total.value = newValue;
var w = document.getElementById("product").selectedIndex;
var str=document.getElementById("product").options[w].text;
var n=str.split(":");
document.form.quantity.value = n[1];
}
send me html code
Use like keyword instead of equal to
"select * from maintable where key like '%" & TextBox3.Text & "%'"
You posted in php, so I replied php code, and the code you have written is in javascript. Now Following is the javascript code.
function Price(data) {
document.getElementById("productprice").value = data.options[data.selectedIndex].id;
newValue = (parseInt(document.form.bottles.value) * parseInt(document.form.price.value));
document.form.total.value = newValue;
var str=document.getElementById("product").innerHTML;
var n=str.split(":");
document.form.quantity.value = n[1];
}