841 Posted Topics

Member Avatar for nishafav

Try this: [code] function doOperation() { static $x=0; static $y=0; static $z=0; $y=$x; $z=$z+$y; echo "X: ".$x."<br>"; echo "Y: ".$y."<br>"; echo "Z: ".$z."<br>"; echo "------<br>"; $x=$x+10; } doOperation(); doOperation(); doOperation(); doOperation(); doOperation(); [/code]

Member Avatar for Shanti C
0
72
Member Avatar for imti321

try this: [code] <?php $username = $_POST['username']; $password = $_POST['password']; if (isset($username,$password)) { $connect = mysql_connect ("localhost","root",""); mysql_select_db("phplogin"); $query = mysql_query("SELECT * FROM `users` WHERE username ='$username' and password='$password'"); $numrows=mysql_num_rows($query); if ($numrows==0) { die("Incorrect username / password"); } } else { die("please enter username and password"); } ?> [/code]

Member Avatar for Zagga
0
155
Member Avatar for nikita.chandra

or After getting date from calender in dd/mm/yyyy format , change this format to yyyy-mm-dd. it is not so difficult.. and then write it in your sql query.

Member Avatar for Shanti C
0
88
Member Avatar for azegurb

In which folder you uploaded the .htaccess file in webserver. and what have you written in .htaccess file..

Member Avatar for azegurb
0
85
Member Avatar for helpplx

A [URL="http://download.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html"]ClassNotFoundException[/URL] means that some where a class that is used in the code is missing. check for that file..

Member Avatar for Shanti C
0
1K
Member Avatar for ankit.pandey3

1.check whether control is going to if or else..Keep echos in two conditions. 2.Try to print [QUOTE]$row['LoginId'][/QUOTE] value before if condition. 3.print cookie value after else.. 4. also try this setcookie('LoginIdCookie',$LoginId,time()-3600); 5.for logout coding why you are checking the id with database(as it is already done in login code).

Member Avatar for Shanti C
0
157
Member Avatar for professor123

User(fname, lname,email and userid ------primary key{userid} ) Exam( examid, examname,categoriid-------primary Key{examid}) Exam_user(examid, userid------ Exam_category(categoryid, categoryname----prmary key{categoryid}) you can write: [code] select u.fname,u.lname,u.email,c.categoryname,e.examname from user as u,exam as e,exam user as eu,category as c where u.userid=eu.userid and eu.examid=e.examid and e.categoryid=c.categoryid; [/code] the above is vary basic query, try inner joins to …

Member Avatar for mschroeder
0
112
Member Avatar for mrlol

set [B]ag_code[/B] field to null in your data base table or try to insert null value for ag_code like: [code] INSERT INTO auditor_only(ag_title,ag_code) VALUES("awefwefaa","") [/code] And check these type of fields any more in your table and set them for null.. or post your structure of table..

Member Avatar for R0bb0b
0
368
Member Avatar for soomro_moon

try to quote your post values like this: [code] '".$_POST['a_id']."' [/code] means your query should like this: [code] mysql_query("insert into patient_information (ID,admission_ID,patient_ID,guardian_ID,admission_date,admission_time,patient_status,reason_for_status,referred_doctor_ID,referred_doctor_name,assigned_doctor_ID,assigned_doctor_name,department_ID,department_name,ward_ID,ward_no,room_ID,additional_notes) values('NULL','".$_POST['a_id']."',..etc [/code] or try to echo your query like: [code] $q="insert into ...."; // your query echo $q; [/code] see that query and post here

Member Avatar for Shanti C
0
103
Member Avatar for tcollins412
Re: Help

use sessions to do login and logout pages.. and contact display page only for logged in members..

Member Avatar for diafol
0
106
Member Avatar for conmen80

These hidden and button names are repeated means duplicated, so your submit button takes last updated value.. Solution1: try to concatenate your button , hidden names with itemcode or for loop iterator. [code] <input type='text' name='txtQty".$rows['itm_id']."' value='".$rows['totalInCart']."'> <input type='hidden' name='hidden_id".$rows['itm_id']."' value='".$rows['itm_id']."'> [/code] Solution2 : Write onclick function for update button …

Member Avatar for Shanti C
0
128
Member Avatar for pakunoda
Member Avatar for sureshksk

If you are using server side sessions for your login, you would have to unset that session for logout, you just check for session exists in every page,if not redirect to index/error page. or try this : [code] <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="-1"> [/code]

Member Avatar for sureshksk
0
879
Member Avatar for xuexue

First try to google and start coding.. Then any problem occur come here for suggestions..Not for doing your home work.. try this: [code] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> </HEAD> <BODY> <SCRIPT LANGUAGE="JavaScript"> function add_val() { ival=document.getElementById('ivalue').value; test.testselect.options[test.testselect.options.length]=new Option(ival,ival); document.getElementById('ivalue').value=""; } //--> </SCRIPT> …

Member Avatar for Shanti C
0
102
Member Avatar for phpDave

can u be little more clear? have you used blob for your images saving in your database? or this : [code] header("Content-type: image/jpeg"); $im = imagecreatefromstring(mysql_result($result, 0)); imagejpeg($im); imagedestroy($im); [/code]

Member Avatar for Shanti C
0
30
Member Avatar for ALorenzo91

try this: [code] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> </HEAD> <BODY> <SCRIPT LANGUAGE="JavaScript"> <!-- var emp = new Array ("Billy", "Jill", "Wolfgang", "Xavier", "Antoinette","John") var empNum = new Array (78,90,23,12,56,31) var i = 0 var empSearch = eval(prompt("Please Enter the ID of the …

Member Avatar for ALorenzo91
0
167
Member Avatar for Abinaya Infy

[QUOTE]2) How to get the path of the window in js?[/QUOTE] [code] var path = document.location.pathname; alert (path); [/code] [QUOTE]1) How to refresh a page in jsp even if the javascript is not supported by the browser or if it is disabled?[/QUOTE] [code] window.location.reload( false ); [/code]

Member Avatar for Shanti C
0
122
Member Avatar for Resentful
Member Avatar for Resentful
0
94
Member Avatar for ankit.pandey3

try this: [code] <input type='radio' name='Sex' style='width:16px; border:0;' value='Male' <?php if($row['Sex']='Male') echo 'checked=checked';?>/>Male <input type='radio' name='Sex' <?php if($row['Sex']='Female') echo 'checked=checked';?> style='width:16px; border:0;' 'value='Female' /> [/code] please check quotes ..

Member Avatar for ankit.pandey3
0
2K
Member Avatar for Web_Sailor

Why don't you go for AJAX for reading txt file every time with out refreshing your page. Google for [URL="http://www.w3schools.com/Ajax/Default.Asp"]AJAX Tutorials[/URL]...

Member Avatar for Shanti C
0
1K
Member Avatar for Resentful

Yes, this is possible. I think you could write your variable initialization in loop . thats why your string variable is re-initialized.. try this: [code] $chatlog=""; // your loop starts here { $chatlog.=$currentchat; } [/code] or post required code ..

Member Avatar for diafol
0
108
Member Avatar for fernando1

hello, Please describe your question clearly.. or this is what you are searching... [code] <form name="confirm" method="post"> Do You want to continue to enter into chat room?<br> <br /> <input type="radio" name="confirm" value="1"> Yes<br> <input type="radio" name="confirm" value="2"> No<br> <input type="submit" value="Submit" onclick="get_radio_value()"> </form> <script type="text/javascript"> function get_radio_value() { var …

Member Avatar for fernando1
0
3K
Member Avatar for Lolalola

You need to create all class files with .class.php extension like: Test1.class.php Test2.class.php Test3.class.php Assume these three classes are in lib directory. and include these class files into your another class file Test4.class.php like : Test4.class.php: [code] include_once('/lib/Test1.class.php'); include_once('/lib/Test2.class.php'); include_once('/lib/Test3.class.php'); [/code] and create objects : [code] $test1 = new Test1(); …

Member Avatar for mschroeder
0
153
Member Avatar for shafeequeom

Go for [URL="http://www.joomla.org/"]Joomla! Content Management[/URL] or google for more !!!

Member Avatar for Shanti C
0
47
Member Avatar for prettyrein

i think you should have to change your 6th line to this: [code] if (!$check) { [/code]

Member Avatar for prettyrein
0
131
Member Avatar for hmhb.in

check [URL="http://php.net/manual/en/language.oop5.overloading.php"]this[/URL]..

Member Avatar for Shanti C
0
118
Member Avatar for xuexue

you can do this by javascript.. try this [URL="http://viralpatel.net/blogs/2009/03/dynamically-add-remove-rows-in-html-table-using-javascript.html"]link[/URL].

Member Avatar for xuexue
0
86
Member Avatar for kiranking

or try this: concatenate $i with your text box id or name.. [code] <?php for ($i=1;$i<10;++$i) {//currently only one textbox for testing purpose echo "<form name='myform' id='myform' method='post'>"; echo "<input name='da'"$i" type='text' id='da'"$i" value='none'>"; echo "<a href='javascript:submit_form();' class='add'>Add</a>"; echo "</form>"; } ?> <script type="text/javascript"> function submit_form() { document.myform.submit(); } </script> …

Member Avatar for diafol
0
206
Member Avatar for sujasmilee

Onpage optimization is the process by which various elements on an individual web page are structured so that the web page can be found by the search engines for specific keyword(s) or keyword phrases. Onpage optimization will not guarantee any top rating within a search engine, only offpage optimization can …

Member Avatar for majanson007
0
675
Member Avatar for phpbeginner

Assume $data is an multi dimensional array. [code] for($i=0;$i<count($data);$i++) { $rs=$data[$i]; } [/code] Now you can implode $rs which is your new array with total elements. [code] $comma_separated = implode(",", $rs); [/code] Try this....

Member Avatar for Shanti C
0
81
Member Avatar for sarika15m

you didn't mention you table name. 1.check your table name. 2.check you table fields any thing more you have missed in insert query. 3. try to write your query like: [code] String q = "insert into user (fname,lname,dob,gender,iden,address) values('" + request.getParameter("fn") + "','" + request.getParameter("ln") + "','" + request.getParameter("dob") + …

Member Avatar for Shanti C
0
76
Member Avatar for spideyprasad
Member Avatar for theo23

try this example, but in javascript: [code] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <script type="text/javascript"> function calculation() { var total=0; total=(document.getElementById('rooms').value)*(document.getElementById('type').value); document.getElementById('diaplay_total').innerHTML="total: "+total+"£"; } </script> </head> <body onload="calculation();"> <form name="test" action=""> <select id="rooms" name="rooms" onchange="calculation();"> <option value="1" >1</option> …

Member Avatar for Shanti C
0
103
Member Avatar for Eric Cute

yes, javaAddict is right,,, Here you are getting client machine resolution properties in javascript only, then why you go for JSP coding here,just try with the above post example. that is the best answer..

Member Avatar for Shanti C
0
29K
Member Avatar for nathenastle

One more point... By using our php codes.. Changing from 100X100 image to 40X50 image will result into same quality image...But vice versa will give corrupted image.. So make it note when your are going develop in your projects..

Member Avatar for red_ruewei
0
344
Member Avatar for serkan sendur
Member Avatar for ronnieaka
0
1K
Member Avatar for Shanti C

hello members, i have wriiten a form in my php page and i did call an ajax function on onsubmit, based on my ajax response my form have to be submit...but i am not getting ajax response text some times. But some times i got it correctly..i have used post …

Member Avatar for Shanti C
0
137
Member Avatar for allena
Member Avatar for Awah Mohamed

Finally Try with this code : [code] <? $musql_database="dbname"; // Give Your DB name also $tbl_name = "posts"; mysql_connect('localhost','username','password')or die("can not connnect to database"); mysql_select_db("$musql_database")or die("sorry , can not sellect db"); $sql="SELECT * FROM $tbl_name"; $result=mysql_query($sql); ?><table width="400" border="0" align="center" cellpadding="3" cellspacing="0"> <tr> <td> <strong><h2>Welcome to Our Website</h2></strong> </td> </tr> …

Member Avatar for Shanti C
0
119
Member Avatar for ahmksssv

Here is some expectablel solution not sure... for example , if you have a quantity field then , if we entered any letters on that it will show an immediate alert "Please Enter Only Numbers (0-9)" if this is your expected solution . then the following is the code for …

Member Avatar for Sam_john_2010
0
116
Member Avatar for Zetlin
Member Avatar for fakemew

[QUOTE=fakemew;713532] <?php echo "<img src='/images/". $filename ."'>" ?> [/QUOTE] in this line the / before the images,Is is must???i think no.. And also make sure that is correct path of your current folder to images folder... or echo $filename; check it with correct path of stored image.. or post your …

Member Avatar for rajarajan2017
0
181
Member Avatar for vmanes
Member Avatar for madoverclocker
Member Avatar for pranav_jog
Member Avatar for Sarahj512
0
621
Member Avatar for tanha

Check these attachments.. These are very usefull for you.. The dropdown works on both php and ajax.. Check out.. Thank Shanti

Member Avatar for cavalry
0
2K
Member Avatar for nufar

or try this: [code] <a href="javascript:;" onClick="window.open('yourpage.php','no','scrollbars=yes,width=550,height=400')" >Open</a> [/code]

Member Avatar for anduma
0
282
Member Avatar for fortiz147
Member Avatar for light-man
1
341
Member Avatar for The Dude
Member Avatar for rajeesh_rsn

yes...in every page which are come after login ,in those pages you have to check for user sessions like [code]if(empty($_SESSION['username'])) { header('location:index.php'); } [/code]...then in your logout page you just clear out your sessions or cookies... like: [code] session_unregister('username'); session_destroy(); [/code]

Member Avatar for vidhyabalu
0
81

The End.