190 Posted Topics
Re: Refer following link [url]http://www.cssdrive.com/index.php/examples/[/url] | |
Re: Code for generating drop down list as follows [CODE]<?php $sql="select eid,ename from emp"; $result = mysql_query($sql); echo "<select name="s">"; while($row = mysql_fetch_array($result)) { ?> <option value="<?php echo $row['eid']; ?>" > <?php echo $row['ename'];?> </option> <?php } ?> [/CODE] | |
Re: What you want ? Want to pass any variables to redirecting page? | |
Hi.. How to check a check box based on a condition at run time? | |
Hi. I have a page to send SMS.For that I am linking a third party page using header function.But I could not return to my home page after redirecting that page.I could not have the privilege to edit that third party page.How will I return to my home page after … | |
Re: try this [CODE]<?php echo '<div> <a href=' .$path.$i.$s.$ext. '> <img src=' .$path.$i.$ext. '> </div>'; ?>[/CODE] | |
Re: refer Following links [url]http://www.k-fez.com/?p=101[/url] [url]http://www.legend.ws/blog/tips-tricks/csv-php-mysql-import/[/url] [url]http://www.dynamicdrive.com/forums/showthread.php?t=48692[/url] | |
Re: Where r u using session variables?in PHP right? | |
Re: Find out whether u can access [url]http://localhost/phpmyadmin[/url]. Refer the following link. [url]http://www.apachefriends.org/f/viewtopic.php?f=16&t=47332[/url] | |
Re: Change your code as, [CODE]<select name="speriod"> <option value='<?php echo $cval; ?> print '>'<?php echo $cval ; ?> print '</option> </select>[/CODE] | |
Re: Post your errors. Then it is easy to find out solution. | |
Re: Use following code at beginning of your every php pages [CODE]ini_set('error_reporting', E_ALL); error_reporting ( E_ALL );[/CODE] | |
Re: Read line by line from the file using fgets() function. Store the text u needed on a variable.(Use if statement for that ); After finishing the read operation close the file and again open it in write mode(w). Write the contents that we are already stored on the variable to … | |
Re: Change your code as, [CODE]<?PHP session_start(); //use mysql query $username="xxxx"; if ($username) { setcookie('mycookie',$username, time()+3600); } include 'dbconnect.php'; ?> <!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=utf-8" /> <title>Welcome to site</title> <link href="container.css" rel="stylesheet" type="text/css" /> <link href="format.css" rel="stylesheet" type="text/css" /> <script src="myjs.js" … | |
Re: Align your code properly.It is very difficult to read. | |
Re: Print your insert query after line no 19. [CODE]echo $sql;[/CODE] Copy and paste it into phpmyadmin(or the query analyser u r using). Execute the query and check out the errors. Also modify [CODE]mysql_query($sql) or die ('Something went wrong with submitting your information <br>'.mysql_error);[/CODE] | |
Re: Try following code [CODE]<html> <body> <?php $connect=mysql_connect("localhost","root","ila"); $query="create database if it not exists demo"; $db=mysql_select_db("demo",$connect); $query= "create table jlt(id int not null , name varchar(49))"; $result=mysql_query($query); $in=$_POST['inputfield']; $query="insert into jlt values(1,'$in')"; if(mysql_query($query,$connect)){ echo "data successfully added"; } else { echo "not success"; } ?> </body> </html> [/CODE] | |
Re: Try this code [CODE]<script type="text/javascript"> if (document.getElementById('other').checked = true) { document.getElementById('whatever').style.visibility = "visible"; } else { document.getElementById('whatever').style.visibility = "hidden"; } </script> <input name="pVital[]" type="checkbox" id="pVital[]" value="I & O" checked="<?php if (in_array('I & O', $pvitals)) echo "checked"; else echo "unchecked"; ?>" />I & O<br/> <input <?php if (in_array('Daily Weight', $pvitals)) echo … | |
Re: Visit following links [url]http://designtutorials4u.com/35-awesome-jquery-navigation-enhancing-plugin-tutorials/[/url] [url]http://labs.dragoninteractive.com/pufferfish_demo/[/url] | |
Re: use Ajax concepts. It will help to refresh a part of a page without refreahing whole page | |
Re: Visit [url]http://www.phpfreaks.com/forums/index.php?topic=260844.0[/url] [url]http://www.webcheatsheet.com/PHP/multidimensional_arrays.php[/url] | |
Re: Try this also [CODE] <?php $i = 0; while ($row=mysql_fetch_array($result)){ ?> <tr> <form name="form1" action="submitAction.php" method="post"> <td width="72" ><input type="text" autocomplete=off readonly name="ProjectName<?php echo $row['No'];?>" value="<?php echo $row['ProjectName'];?>" size="20" style="font-size: 9"></font></td> <td width="72" ><input type="text" autocomplete=off readonly name="DeviceType<?php echo $row['No'];?>" value="<?php echo $row['DeviceType'];?>" size="15" style="font-size: 9"></font></td> <td width="64" ><input type="button" … | |
Re: Refer [url]http://www.devshed.com/c/a/PHP/Email-Address-Verification-with-PHP/1/[/url] [url]http://www.phpeasystep.com/phptu/24.html[/url] | |
Re: Use following expression +[^\s] .+ means any character \s means space character [^\s] means except space character | |
Hi, I am using c#. I have a problem of finding the difference between 2 dates in terms of year,month and day. For example Finding the difference of 2 dates(mm/dd/yy). date1=12/3/2010 date2=3/5/2011 I used the following code [ICODE] int year=date2.Year-date1.Year; int month=date2.Month-date1.Month; int day=date2.Day-date1.Day; [/ICODE] The output I am getting … | |
Re: Use the following lines of code to check ur database connection [CODE] $con = mysql_connect('localhost','root',''); if (!$con) { die('Could not connect: ' . mysql_error()); } else { echo "Connected"; } $sel=mysql_select_db("employdb1"); if (!$sel) { die('Could not Select: ' . mysql_error()); } else { echo "Selected"; } [/CODE] Run this file … | |
Re: What you want to do?You want to format the output? | |
Re: use break; after line no 11. And check your output. | |
Re: Check out the spelling of form fields in the previous page. Confirm that the field name is 'message' | |
Re: The name of the two submit buttons are the same. Edit first button name as submit1.Also edit isset($_POST['submit']) as isset($_POST['submit1']) Only that much. | |
Hi, I have a table field with var char data type having values like TVM/345/2000,TVM/01/00,TSR/42/01 etc.I want to extract the sub string from first location to the second '/' location as TVM/345/. Is there any built in function to solve is? Thanks | |
Re: What is the problem with your code?Can you explain it? ![]() | |
Hi.. I am frequently using XAMPP's phpmyadmin for MYSQL database. I want to install original Mysql database from their developer's site([url]http://www.mysql.com[/url]). I am very confused that I found 6 types softwares. Which one should I install? I also need to access the software using GUI.. Any body can help me? … | |
Re: Try this code It using Java script [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> function check() { var len=document.f.ck.length; var ck=document.f.ck; var l=0; for(var i=0;i<len;i++) { if(ck[i].checked==true) { l++; } if(l>3) { ck[i].checked = false ; } } … | |
Re: Visit [url]http://www.tizag.com/[/url] | |
Re: Visit Following Links [url]http://javascript.internet.com/time-date/date-picker.html[/url] [url]http://www.javascriptkit.com/script/script2/tengcalendar.shtml[/url] | |
Re: Load some PHP script at the time of onunload event using ALAX.Use session_destroy function to destroy the session. | |
Re: What r u storing on array?post the array values.. | |
Re: Try this.. [CODE]<?php $myarray=array(0=>"a,1",1=>"b,2",2=>"a,2"); $a=implode(",",$myarray); $a=explode(",",$a); $b=array(); $k=0; for($i=0;$i<sizeof($a);$i++) { if($i%2==0) { $b[$k]=$a[$i]; $k++; } } $c=array_unique ( $b); print_r($c); ?> [/CODE] | |
Re: visit the following url. [url]http://www.phpclasses.org/package/6563-PHP-Display-links-to-browse-listings-split-in-pages.html[/url] | |
Re: Or include the page you want to display using include() function | |
Hi I want to set focus to a text field on a php page which is loaded by ajax. The javascript file for ajax is shown below [CODE] <script> function menu_change(str) { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else { // code … | |
Re: Visit the following links and Try out examples.. [url]http://www.w3schools.com/PHP/php_ajax_database.asp[/url] [url]http://www.tizag.com/ajaxTutorial/ajaxphp.php[/url] | |
Re: using FTP u can upload the files to another server. $file1 = "example.jpg"; $file2 = fopen("ftp://username:password@sitename.com/" . $file1, "w"); $txt= file_get_contents($file1); fwrite($file2, $file1, strlen($txt)); fclose($file2); Using CURL also u can upload the files visit the following links [url]http://dtbaker.com.au/random-bits/up...rl-in-php.html[/url] ![]() | |
Re: Create the table before loading other parts of the code. | |
Re: Use the following script [CODE] <?php require 'connect.php'; $userg = mysql_query("SELECT avatar FROM members") or die("Failed to fetch your details."); if (isset($_SESSION['MM_Username'])){ echo "Welcome ".$_SESSION['MM_Username']; ?> <img src="<?php echo mysql_result($userg,0,"avatar" ); ?>" width="50%" height="50%"> <?php } ?> [/CODE] | |
The End.