619 Posted Topics

Member Avatar for vishalpala
Member Avatar for karthik_ppts
0
72
Member Avatar for diafol

Your loop is messy. This code shows simple looping for showing data in tabular form. [CODE] <?php $username="root"; $password=""; $database=""; mysql_connect('localhost',$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM jokes"; $result=mysql_query($query); echo '<table width="900%" border="0">'; while($sar = mysql_fetch_assoc($result)) { echo '<tr> <td>'.$sar['name'].'</td> <td>'.$sar['content'].'</td> </tr>'; } echo '</table>'; mysql_close(); …

Member Avatar for vibhaJ
1
88
Member Avatar for karthik_ppts

Can you replace your code with this. Also make sure image exists in given path. [CODE] var new_icon = new GIcon(); new_icon.image = "images/car_blue.png" ; new_icon.size = new GSize(16,16) ; new_icon.iconAnchor = new GPoint(6, 20); new_icon.infoWindowAnchor = new GPoint(5,1) ; var marker = new GMarker(point, new_icon); map.addOverlay(marker); [/CODE]

Member Avatar for karthik_ppts
0
300
Member Avatar for cliffcc

You can make changes according to your database. [CODE] <? mysql_connect('localhost','root',''); mysql_select_db('test'); $sql = "select student_name,student_sirname from student"; // Query Database $filename = 'file.csv'; $rsSearchResults = mysql_query($sql) or die(mysql_error()); $out = ''; // fiels to export $out .='Student Name,Sirname'; $out .="\n"; // Add all values in the table while ($l …

Member Avatar for vibhaJ
0
176
Member Avatar for rpjd

Your question is pretty unclear. Do you have problem with matching posted id with table OR dou you want to parse html ?

Member Avatar for vibhaJ
0
72
Member Avatar for vibhaJ

Hi Friends, I am having one contact-us php script. Here i have used php mail function to send email to admin. Even-though i have also used captcha coding, admin is still continuously getting spam (dummy texts) contact us emails. Actually I am not sure how spammers do such activity. If …

Member Avatar for Batch Devil
0
128
Member Avatar for murtazamzk

You can not get it in [B][U]urgency[/U][/B]. First you have to refer 2 or 3 matching sites like naukri, monster. Then you can discuss with your client and decide your required modules. You can simultaneously design database and can start working on admin panel.

Member Avatar for chrishea
0
320
Member Avatar for ckdoublenecks

Here is a code for date difference you can use $days and save it in your database. [CODE] <? $duedate = '2011-04-29'; $currdate = date('Y-m-d'); $date1 = $duedate; $date2 = $currdate; $diff = abs(strtotime($date2) - strtotime($date1)); $years = floor($diff / (365*60*60*24)); $months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24)); …

Member Avatar for ckdoublenecks
0
89
Member Avatar for srdva59

ics file is sort of xml structure. You can find xml php parser or xmltoarray function [URL="http://mysrc.blogspot.com/2007/02/php-xml-to-array-and-backwards.html"] like this[/URL] and then can save its value in mysql database.

Member Avatar for srdva59
0
123
Member Avatar for cliffcc

If iframe's search page is your php code then you can make a session and save last url in that session. When page is loaded or refreshed you can use session's remembered url as a src of iframe.

Member Avatar for cliffcc
0
116
Member Avatar for ckdoublenecks

1) Why there is two time mysql_connect 2) what is $data['taxrate'], it is nevwe defined above code. [CODE] $taxrate = $_POST['taxrate']; echo "taxrate " . $data['taxrate']; [/CODE] 3)there should be some variable which hold mysql_fetch_assoc result. [CODE] mysql_fetch_assoc(mysql_query($query)); [/CODE] 4) so finaly [CODE] <?php mysql_connect("localhost", "root", ""); mysql_select_db(numbersdb) or die("Unable …

Member Avatar for ckdoublenecks
0
169
Member Avatar for monta2020

You can use mysql_real_escape_string function for filtration. Refer this link.[URL="http://in2.php.net/manual/en/function.mysql-real-escape-string.php"]http://in2.php.net/manual/en/function.mysql-real-escape-string.php[/URL]

Member Avatar for vibhaJ
0
100
Member Avatar for d4n1s

This is because default timezone for mysql and php is different. Check [URL="http://forums.mysql.com/read.php?10,259199,259245#msg-259245"]here[/URL] for mysql timezone and [URL="http://php.net/manual/en/function.date-default-timezone-set.php"]here[/URL] for php timezone.

Member Avatar for vibhaJ
0
121
Member Avatar for devinodaniel

I think you need ajax.Reason is below. let you have a result in frame-1. Once you submit form page is refreshed. So even your next target is frame2, your frame1 data will be cleared because of second form submit.

Member Avatar for devinodaniel
0
221
Member Avatar for rajeesh_rsn

ckeditor is one of the mostly used editor. [URL="http://ckeditor.com/demo"]check here demo[/URL] And see fourth tab (Custom toolbar) All editor icons are customized, you can change configuration based on requirement.

Member Avatar for rajeesh_rsn
0
134
Member Avatar for amit.hak50

Previously i have explained you reason for foreach error. Also as i said your given API string is not working for me. Here is API link i found for yahoo. [URL="http://search.yahooapis.com/WebSearchService/V1/webSearch?appid=YahooDemo&query=yahoo"]http://search.yahooapis.com/WebSearchService/V1/webSearch?appid=YahooDemo&query=yahoo[/URL] You can find more parameter options here. [URL="http://developer.yahoo.com/search/web/V1/webSearch.html"]http://developer.yahoo.com/search/web/V1/webSearch.html[/URL]

Member Avatar for amit.hak50
0
625
Member Avatar for amit.hak50

For php error, Always put foreach in if condition. [CODE] if(count($rs['items'])>0) { foreach($rs['items'] as $item) { //--- code--- } } else { echo 'There is no items...'; } [/CODE] And for URL there are some php variables in url like [B]$search[/B]. Check the string generated (output of php code) in …

Member Avatar for amit.hak50
0
271
Member Avatar for phplover
Member Avatar for minitauros

Core javascript ajax is headache. Why don't you try jquery ajax. [URL="http://api.jquery.com/jQuery.ajax/"]check here[/URL] Its too easy to operate.

Member Avatar for Airshow
0
437
Member Avatar for alfredferg

[QUOTE=alfredferg;1541972] $myQueryVar1 = mysql_query("DELETE FROM mytable1 WHERE id='$idExecuted'"); $myQueryVar2 = mysql_query("DELETE FROM mytable2 WHERE id='$idExecuted'"); $myQueryVar3 = mysql_query("DELETE FROM mytable3 WHERE id='$idExecuted'"); $myQueryVar4 = mysql_query("DELETE FROM mytable4 WHERE id='$idExecuted'"); $myQueryVar5 = mysql_query("DELETE FROM mytable5 WHERE id='$idExecuted'"); [/QUOTE] The above code is right and should work. What is problem you are …

Member Avatar for tomato.pgn
0
135
Member Avatar for jfunchio
Member Avatar for vibhaJ
0
254
Member Avatar for vukidrock

I am still confused what is your exact requirement? Why don't you directly write loop on index.php. What is the use of all.php?

Member Avatar for vukidrock
0
235
Member Avatar for aaraf

If you dont want to use database then you can use one simple txt file for lock and unlock. If master login add text in txt file as 'ON'. Make it 'OFF' when logout. If slave login then read txt file, if it is 'ON' then only slave can login.

Member Avatar for diafol
0
89
Member Avatar for umeshMCA

Check this... [url]http://www.mekya.com/blog/lang/eng/2010/03/demo-of-editable-jquery-tree-with-php-codes-duzenlenebilir-jquery-agac-yapisinin-demosu/[/url]

Member Avatar for diafol
0
293
Member Avatar for fidolas7
Member Avatar for Joe34

Not sure, but try this using eval function. [CODE] var code = document.getElementById('code').value; eval(code); [/CODE]

Member Avatar for Airshow
0
146
Member Avatar for ptara1

post your code. I use below searching logic: 1. Create join query which will have all five parameters as a result. 2. now create where condition by concatenation. e.g. [CODE] if(isset($_POST['color'])) $where.= " AND table1.color=".$_POST['color']; if() .... [/CODE] 3. So your final query will be. $sql = " select... WHERE …

Member Avatar for urtrivedi
0
353
Member Avatar for Yemen Coder

There is no big difference between Mysql and Mysqli. Mysqli is nothing but an improved extension of Mysql which supports OOPS. In some blogs and benchmark says that Mysql is slightly faster than the Mysqli Extension.

Member Avatar for infinitizon
0
153
Member Avatar for aaronmk2

Try this code. It will print all php configuration. So that you can check existing dlls. [CODE] <?php // Show all information, defaults to INFO_ALL phpinfo(); // Show just the module information. // phpinfo(8) yields identical results. phpinfo(INFO_MODULES); ?> [/CODE]

Member Avatar for aaronmk2
0
177
Member Avatar for jacob21

[CODE] SELECT City ,count(*) FROM `Persons` group by City [/CODE]

Member Avatar for metalix
0
103
Member Avatar for monta2020

I think you are talking about HTML table. You can fix the width of table. You need to post your code for review. PLEASE USE CODE TAGS.

Member Avatar for metalix
0
137
Member Avatar for ayesha789

I think its not because of space. Your href link must start with http:// to work in browser. When you click on link what is url shown in browser?

Member Avatar for ayesha789
0
181
Member Avatar for Joshua Kidd
Member Avatar for karthik_ppts
0
141
Member Avatar for ivan3510

APC is a PECL Extension Try Getting the package and install for more info on apc Extension [url]http://pecl.php.net/package/APC[/url]

Member Avatar for ivan3510
0
386
Member Avatar for turt2live

On onclick event of button you can call one js function. In js function call ajax to increment click counter.

Member Avatar for turt2live
0
160
Member Avatar for ROTC89

Yes urtrivedi is right. you can always use `(escape) character around table name to avoid it. [CODE] ..... INSERT INTO `join` [/CODE]

Member Avatar for vibhaJ
0
203
Member Avatar for joomphp

If you have object for database then that function can be used. otherwise, [CODE] <? function deleteEntry() { return mysql_query("delete from manage where entryId='".$this->entryId."'") or die(mysql_error());//delete $this->entryId from database } ?> [/CODE]

Member Avatar for ariese
0
84
Member Avatar for karthik_ppts

1. count distance between x and y point. 2. check wheather it is less than radious (y is inside) it is greater than radious (y is outside)

Member Avatar for karthik_ppts
0
161
Member Avatar for TechySafi
Member Avatar for branding4you

1. session_start(); must be on the first line of coding. 2. where is $_SESSION['key'] defined? 3. you have to check user's entered code with session captcha code on add_enquiry.php page. Because your form action is 'add_enquiry.php' which will directly executed code without checking captcha.

Member Avatar for branding4you
0
177
Member Avatar for rajeesh_rsn

You have to use absolute path. You can define one php variable and use it in js, image, css path. [CODE] $siteurl = 'http://www.site.com'; [/CODE] <img src="<?=$siteurl?>/images/test.jpg">

Member Avatar for vibhaJ
0
81
Member Avatar for monta2020

Check this code. And implement as per your need. [CODE] <script language="javascript"> function valid(form) { if(form.name.value=="") { alert('Please enter name'); return false; } else if(form.subject.value=="") { alert('Please enter subject'); return false; } else { return true; } } </script> <form name="frm" id="frm" method="post" onsubmit="return valid(this);"> <br />Name : <input name="name" …

Member Avatar for phpbeginners
0
249
Member Avatar for Violet_82

Why don't you toggle both layout. Here is code for that. [CODE] <script language="javascript"> function changeText() { document.getElementById('layout1').style.display = 'none'; document.getElementById('layout2').style.display = 'block'; } function resetText() { document.getElementById('layout2').style.display = 'none'; document.getElementById('layout1').style.display = 'block'; } </script> <div id="to_change_into_image" class="box"> <div id="layout1"> <h1>Table for layout</h1> <table class="table_for_layout"><!--OUTER TABLE--> <tbody><tr> <td></td><td colspan="2"><p><br></p><h2>Web editing …

Member Avatar for Violet_82
0
185
Member Avatar for liamfriel

[CODE] <?php $subject = "<a href='google.com'>Google link</a>"; $pattern = "/url|link|href/"; preg_match($pattern, substr($subject,3), $matches, PREG_OFFSET_CAPTURE); print_r($matches); ?> [/CODE]

Member Avatar for liamfriel
0
163
Member Avatar for bigwhiteegg

[CODE] <?php // the HTML source of a URL. $lines = file('http://www.google.com/'); // Loop through our array, show HTML source as HTML source; and line numbers too. foreach ($lines as $line_num => $line) { echo "Line #<b>{$line_num}</b> : " . htmlspecialchars($line) . "<br />\n"; } ?> [/CODE]

Member Avatar for bigwhiteegg
0
86
Member Avatar for kofawais
Member Avatar for TechySafi

You can design your database this manner: [CODE] commentId| parentCommentId |user |comment 1 | 0 |XYZ |hsdahfkasydf astdfsa dftasdf astdfasdf 2 | 1 |TYU |why you writing wirdo? 3 | 1 |IOP |wtf! 4 | 0 |VBN |I love daniweb. 5 | 4 |DFG |me too. [/CODE]

Member Avatar for TechySafi
0
89
Member Avatar for navp

[CODE] function check() { var a = document.getElementById('name').value; var b = document.getElementById('address').value; if( a =="" || b==""){ alert("Input fields can not be empty"); return false; } return true; } [/CODE] Where name and address is id of the fields.

Member Avatar for vibhaJ
0
174
Member Avatar for jacob21

Here is a query. [CODE] SELECT name, count( * ) FROM `student` WHERE 1 GROUP BY name [/CODE]

Member Avatar for tomato.pgn
-1
81
Member Avatar for Tempest will

Also use value in option tag. Because it may cause issue in IE. [CODE] <?php // your database connection here echo "<select name='dropdown1'>"; $query = mysql_query("SELECT * from employeedetails"); while($result=mysql_fetch_array($query)); { echo "<option value='".$result['EmployeeID']."' name='id_list'>".$result['EmployeeID']."</option>"; } echo "</select>"; ?> [/CODE]

Member Avatar for vibhaJ
0
115

The End.