1,257 Posted Topics

Member Avatar for amkaos

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 …

Member Avatar for amkaos
0
287
Member Avatar for krunal1986

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 …

Member Avatar for urtrivedi
0
352
Member Avatar for fashxfreak

You can use vlookup function for the same purpose http://www.techonthenet.com/excel/formulas/vlookup.php

Member Avatar for urtrivedi
0
261
Member Avatar for Maideen

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(); …

Member Avatar for urtrivedi
0
167
Member Avatar for Maideen

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);

Member Avatar for Maideen
0
552
Member Avatar for sbibek
Member Avatar for geneh23

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.

Member Avatar for geneh23
0
496
Member Avatar for jLamp
Member Avatar for jaycob15
0
103
Member Avatar for wvoke9

<?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"; ?>

Member Avatar for wvoke9
0
208
Member Avatar for jethaya

$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'];

Member Avatar for jethaya
0
184
Member Avatar for GlenRogers

I used 2 tables for solving this problem in past. Table pair gives unlimited categories or not categories at all. This is same as directory structure in your computer. 1) product_master (prod_id, prod_name, is_group, other_columns) 2) product_level (child_prod_id, parent_prod_id, level_no) product_master prod_id, prod_name, is_group, other_columns 0, Items, Y, XYZ (This …

Member Avatar for GlenRogers
0
1K
Member Avatar for ahmed.hayman

<iframe width="450" height="350" src="http://www.youtube.com/embed/sqzSlbZ4BCE" frameborder="0" allowfullscreen></iframe>

Member Avatar for JorgeM
0
144
Member Avatar for robinkang

First time you set CURLOPT_COOKIEJAR, for rest of all calls, use same name with option CURLOPT_COOKIEFILE. <?php $cookie=tempnam("/tmp","CURLCOOKIE"); $agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7"; ; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $login); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, …

Member Avatar for robinkang
0
259
Member Avatar for Fiorentino01^

phpmyadmin version has nothing to do with mysql command syntax, mysql version is important. What sql you writing and what error are u getting.

Member Avatar for Fiorentino01^
0
292
Member Avatar for heena92
Member Avatar for geniusvishal
0
173
Member Avatar for Shodow

I assume that ur string have only one colon, and next to colon is the text u need to find $fullstr=" 5 gallon qty: 10"; $strarr=explode(":",$fullstr) echo "qty=".trim($strarr(1));

Member Avatar for urtrivedi
0
122
Member Avatar for snehal89

what is your datatype of startime, endtime, i guess it of type date and not varchar if its date type, then you need not to use to_date simply starttime>'14-feb-2012 01:00:00 am' will work

Member Avatar for ghulamyassen
0
265
Member Avatar for coder91

try to join with userid insteaad username on CustomerCode = *aspnet_Users.UserId* select aspnet_Membership.UserId,IsLockedOut,UserName,tableCustomer.CustomerName,tableCustomer.CustomerContactName from dbo.aspnet_Membership left join dbo.aspnet_Users on aspnet_Users.UserId = aspnet_Membership.UserId left join dbo.tableCustomer on CustomerCode = aspnet_Users.UserId where IsLockedOut = 1

Member Avatar for urtrivedi
0
281
Member Avatar for abzy1991

abzy, you saying so many times in your post that you dont understand basket ball, before designing ERD you need to learn all things (rules,scoring method,people involved) about basketball, otherwise your ERD will surely go wrong, if you build it on scattered tips received here.

Member Avatar for aaa001
0
195
Member Avatar for vidyya06
Member Avatar for urtrivedi
0
918
Member Avatar for adishardis

function checkEmail($email) { if (!preg_match("/^([a-zA-Z0-9\._-])+([a-zA-Z0-9\._-] )*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/" , $email)) { return false; } return true; } $dbemail="abc.com"; if(checkEmail($dbemail)) { echo "ok"; } else { echo "invalid email"; }

Member Avatar for adishardis
0
475
Member Avatar for venkyb47

In my view, if possible status list is not going to change ever, then you can use enum type

Member Avatar for drjohn
0
3K
Member Avatar for riahc3

I think its simple 2D array $arr[0]['name']=Bob; $arr[0]['last']=Jones; $arr[0]['age']=36; $arr[1]['name']=James; $arr[1]['last']=Brown; $arr[1]['age']=29; $arr[2]['name']=Lloyd; $arr[2]['last']=Mals; $arr[2]['age']=45; echo $arr[1]['name'];

Member Avatar for diafol
0
518
Member Avatar for vishalonne

I changed you line number 8 in your code and I added last line in ur orderconfirm function $cart = $_SESSION['cart']; $items = explode(',',$cart); $result = count($items); $total_list=''; for ($i=0; $i<$result; $i++) { //echo $items[$i]; $total_list=$total_list."<br>".orderconfirm($items[$i]); //URTRIVEDI MODIFIED THIS LINE } function orderconfirm($productid) { $cus_id = $_SESSION['own_email']; $pro_id = $productid; …

Member Avatar for vishalonne
0
116
Member Avatar for mpc123

post complete code, $row is not used anywhere in your code, so better you write php code where needed, dont include all static html code in php echo.

Member Avatar for mpc123
0
153
Member Avatar for kitschkath

In my view deleting record can not be done buy pure html. If you embed php code in javascript, that code will execute at the time of page loading and not when buttton is clicked. simple javascript can not tell server to delete record (unless you use ajax). And for …

Member Avatar for urtrivedi
0
226
Member Avatar for mehar89
Member Avatar for thomaspoul
Member Avatar for Navya91

sample data models http://www.databaseanswers.org/data_models/index.htm class scheduling http://www.databaseanswers.org/data_models/student_class_scheduling/index.htm

Member Avatar for Navya91
0
194
Member Avatar for pucivogel

I have lines changed 5 to 15 in above code, you can not write if in string formation. remove all your 5 - 15 lines and only add following line. $q = mysql_query("INSERT INTO kontakte (emri, mbiemri,e-mail,nr,adresa,shenime) VALUES('{$_POST['emri']}','{$_POST['mbiemri']}','{$_POST['email']}','{$_POST['nr']}','{$_POST['adresa']}','{$_POST['shenime']}')");

Member Avatar for urtrivedi
0
141
Member Avatar for Noth

$result = mysql_query(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `username` = '$username' AND `recover_password` = '$recover_password'"); $row = mysql_fetch_array($result)); if($row[0]==1) $flag=true; else $flag=false;

Member Avatar for urtrivedi
0
199
Member Avatar for daniel36

You way is not proper to achieve your aim. Use any of the following 2 ways Way 1 <?php $bd=array('1'=>'420','2'=>'520'); echo $bd[1]."<br>"; echo $bd[2]; ?> Way 2 <?php $bd[1]=420; $bd[2]=520; echo $bd[1]."<br>"; echo $bd[2]; ?>

Member Avatar for daniel36
0
120
Member Avatar for lukas.vandendijssel

Try with double quotes, use statement given below, Php string is in double quote and html element values are in single quote echo("<embed src='flash/" . rand(1, 5) . ".swf' type='application/x-shockwave-flash' width='320' height='240'></embed>");

Member Avatar for bradly.spicer
0
316
Member Avatar for cgull

are u working on ur computer or script is somewhere on live server? You need to check spellings of all js file u include, are they in /javascripts folder or not

Member Avatar for cgull
0
866
Member Avatar for fouledout443
Member Avatar for waleshoola

<a href='http://yoursite/yourpdffolder/pdffile1.pdf'>My first pdf</a> <a href='http://yoursite/yourpdffolder/pdffile2.pdf'>My second pdf</a> If clients browser has appropriate pdf reader, it will open it on click in same window, otherwise ask user to save it. you can generate above code dynaimcally using dir php function

Member Avatar for urtrivedi
0
174
Member Avatar for fawza

I use md5 in both mysql and php for oracle following link may help http://www.oracle-base.com/articles/9i/storing-passwords-in-the-database-9i.php

Member Avatar for Rahul47
0
260
Member Avatar for SyncMaster170
Member Avatar for showman13

select * from table where DESCRIPTION LIKE "%searchterm1%" or DESCRIPTION LIKE "%searchterm2%" or DESCRIPTION LIKE "%searchterm3%" or DESCRIPTION LIKE "%searchterm4%"

Member Avatar for showman13
0
96
Member Avatar for vizz

try storing collation as utf8_general_ci for the varchar/text column, then normal update insert will save it in unicode

Member Avatar for vizz
0
1K
Member Avatar for nagarajuapex

Lastmitch I think above query will work on mysql Nagarjun you can use MERGE query to update table from another table in oracle merge destination_table d using source_table s on (d.key1=s.key1 and d.key2=s.key2) when matched then update set d.colx=s.coly

Member Avatar for LastMitch
0
180
Member Avatar for Tunnleram
Member Avatar for chandub

Here is the code <html> <script lang='javascript'> function fraclength(num) { alert(num.split(".")[1].length) ; } fraclength("54.93934"); </script> </html>

Member Avatar for peter_budo
0
128
Member Avatar for Wailintun

the souce is wat responsible of what u see on browser, you can not hide it from user, dont waste time in that make server side script stronger and secure

Member Avatar for urtrivedi
0
65
Member Avatar for Eyeteeorg
Member Avatar for urtrivedi
0
84
Member Avatar for varma51
Member Avatar for richjohn.bulante

select 'FHMS' + max(SUBSTRING ( employeeId ,5 , 5 ))+1 as nextkey from employeemaster I hope This is the query you are looking for

Member Avatar for sandeepmittal11
0
3K
Member Avatar for facarroll

AND must follow boOlean result. you are giving subquery to AND tell us : table strutrute sample data sample expected output

Member Avatar for urtrivedi
0
124
Member Avatar for hsp001
Member Avatar for AARTI SHRIVAS

The End.