841 Posted Topics
Re: 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] | |
Re: 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] ![]() | |
Re: 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. | |
Re: In which folder you uploaded the .htaccess file in webserver. and what have you written in .htaccess file.. | |
Re: 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.. | |
Re: 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). | |
Re: 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 … | |
Re: 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.. | |
Re: 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 | |
Re: use sessions to do login and logout pages.. and contact display page only for logged in members.. ![]() | |
Re: 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 … | |
Re: check whether you are using post or get in form tag.. | |
Re: 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] | |
Re: 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> … | |
Re: 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] | |
Re: 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 … | |
Re: [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] | |
Re: try this before inserting: [code] $answer=addslashes($answer); [/code] | |
Re: 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 .. | |
Re: 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]... | |
Re: 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 .. ![]() | |
Re: 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 … | |
Re: 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(); … | |
Re: Go for [URL="http://www.joomla.org/"]Joomla! Content Management[/URL] or google for more !!! | |
Re: i think you should have to change your 6th line to this: [code] if (!$check) { [/code] | |
Re: check [URL="http://php.net/manual/en/language.oop5.overloading.php"]this[/URL].. | |
Re: 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]. | |
Re: 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> … ![]() | |
Re: 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 … | |
Re: 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.... | |
Re: 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") + … | |
Re: Oracle or Mysql based on application requirement.. | |
Re: 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> … | |
Re: 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.. | |
Re: 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.. | |
Re: [B][COLOR="GREEN"]Johnny[/COLOR][/B]...[ [B]Pawan Kalyan[/B]'s] -- Telugu [India] | |
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 … | |
| |
Re: 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> … | |
Re: 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 … | |
Re: To get into love with someone...... | |
Re: [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 … ![]() | |
Re: [url]http://www.softlandingeurope.com/bcd/explorer.htm[/url] | |
Re: Check these attachments.. These are very usefull for you.. The dropdown works on both php and ajax.. Check out.. Thank Shanti | |
Re: or try this: [code] <a href="javascript:;" onClick="window.open('yourpage.php','no','scrollbars=yes,width=550,height=400')" >Open</a> [/code] | |
Re: see this code will work at this url: [url]http://www.daniweb.com/forums/thread134908.html[/url] | |
Re: Heat, Ten , Hence... playstation | |
Re: 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] |
The End.