190 Posted Topics

Member Avatar for mwenyenia07
Member Avatar for divyakrishnan
0
132
Member Avatar for arsala211

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]

Member Avatar for klemme
-2
109
Member Avatar for gordo58
Member Avatar for gordo58
0
246
Member Avatar for divyakrishnan
Member Avatar for divyakrishnan

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 …

Member Avatar for abhi10kumar
0
115
Member Avatar for furqankhyraj

try this [CODE]<?php echo '<div> <a href=' .$path.$i.$s.$ext. '> <img src=' .$path.$i.$ext. '> </div>'; ?>[/CODE]

Member Avatar for divyakrishnan
0
112
Member Avatar for cliffcc

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]

Member Avatar for cliffcc
0
3K
Member Avatar for abhi10kumar
Member Avatar for jollyjain

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]

Member Avatar for Stefano Mtangoo
0
293
Member Avatar for jacksantho

Change your code as, [CODE]<select name="speriod"> <option value='<?php echo $cval; ?> print '>'<?php echo $cval ; ?> print '</option> </select>[/CODE]

Member Avatar for karthik_ppts
0
89
Member Avatar for Lius
Member Avatar for AngelicOne

Use following code at beginning of your every php pages [CODE]ini_set('error_reporting', E_ALL); error_reporting ( E_ALL );[/CODE]

Member Avatar for AngelicOne
0
308
Member Avatar for DILO3D

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 …

Member Avatar for DILO3D
0
6K
Member Avatar for 68thorby68

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" …

Member Avatar for 68thorby68
0
137
Member Avatar for Annuscha
Member Avatar for phaedrusGhost

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]

Member Avatar for karthik_ppts
0
167
Member Avatar for geekme

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]

Member Avatar for geekme
0
174
Member Avatar for 7kemZmani

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 &amp; O" checked="<?php if (in_array('I &amp; O', $pvitals)) echo "checked"; else echo "unchecked"; ?>" />I &amp; O<br/> <input <?php if (in_array('Daily Weight', $pvitals)) echo …

Member Avatar for divyakrishnan
0
196
Member Avatar for urtrivedi

Visit following links [url]http://designtutorials4u.com/35-awesome-jquery-navigation-enhancing-plugin-tutorials/[/url] [url]http://labs.dragoninteractive.com/pufferfish_demo/[/url]

Member Avatar for urtrivedi
0
160
Member Avatar for Pavlos1316

use Ajax concepts. It will help to refresh a part of a page without refreahing whole page

Member Avatar for divyakrishnan
0
90
Member Avatar for atfOnly

Visit [url]http://www.phpfreaks.com/forums/index.php?topic=260844.0[/url] [url]http://www.webcheatsheet.com/PHP/multidimensional_arrays.php[/url]

Member Avatar for divyakrishnan
0
91
Member Avatar for chaychie

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" …

Member Avatar for divyakrishnan
0
1K
Member Avatar for Charles1620
Member Avatar for Siberian

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]

Member Avatar for MooGeek
0
193
Member Avatar for jollyjain

Use following expression +[^\s] .+ means any character \s means space character [^\s] means except space character

Member Avatar for divyakrishnan
0
105
Member Avatar for divyakrishnan

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 …

Member Avatar for divyakrishnan
0
132
Member Avatar for jacob21
Member Avatar for utthu

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 …

Member Avatar for utthu
0
155
Member Avatar for jacob21
Member Avatar for peterpa
Member Avatar for naru vaishnaw

Check out the spelling of form fields in the previous page. Confirm that the field name is 'message'

Member Avatar for urtrivedi
0
137
Member Avatar for jacob21

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.

Member Avatar for jacob21
0
2K
Member Avatar for divyakrishnan

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

Member Avatar for divyakrishnan
0
120
Member Avatar for geekme
Member Avatar for urtrivedi
0
172
Member Avatar for naru vaishnaw
Member Avatar for diafol
0
150
Member Avatar for divyakrishnan

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? …

Member Avatar for pritaeas
0
147
Member Avatar for ashiiiish

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 ; } } …

Member Avatar for ashiiiish
0
129
Member Avatar for Dorar
Member Avatar for jrotunda85

Visit Following Links [url]http://javascript.internet.com/time-date/date-picker.html[/url] [url]http://www.javascriptkit.com/script/script2/tengcalendar.shtml[/url]

Member Avatar for divyakrishnan
0
1K
Member Avatar for swilliamrobert

Load some PHP script at the time of onunload event using ALAX.Use session_destroy function to destroy the session.

Member Avatar for divyakrishnan
0
214
Member Avatar for cjohnweb
Member Avatar for atfOnly

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]

Member Avatar for atfOnly
0
137
Member Avatar for jacob21

visit the following url. [url]http://www.phpclasses.org/package/6563-PHP-Display-links-to-browse-listings-split-in-pages.html[/url]

Member Avatar for karthik_ppts
0
1K
Member Avatar for naru vaishnaw
Member Avatar for divyakrishnan
0
110
Member Avatar for divyakrishnan

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 …

Member Avatar for divyakrishnan
0
106
Member Avatar for pxndx

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]

Member Avatar for pxndx
0
162
Member Avatar for niths

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]

Member Avatar for diafol
0
115
Member Avatar for tatarao25
Member Avatar for tatarao25
0
93
Member Avatar for naru vaishnaw

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]

Member Avatar for divyakrishnan
0
156
Member Avatar for yumyam09

The End.