619 Posted Topics

Member Avatar for daniel36

Wherever you are using `$_GET'tm'] ` use ` isset($_GET['tm']) `before it as shown below `if(isset($_GET['tm']) && $_GET['tm']...something..)`

Member Avatar for vibhaJ
0
141
Member Avatar for veledrom

You want to redirect to xml page, what is goback.php? If you want to redirect to xml file i.e. myfile.xml then, `header("location:myfile.xml");`

Member Avatar for vibhaJ
0
231
Member Avatar for PF2G

You mean your search is working fine, but you just need to arrange search result list.. Is it right??

Member Avatar for PF2G
0
166
Member Avatar for hwoarang69
Member Avatar for ramganesht

id is missing in query. ` $query = "SELECT id, type, name, location, landmark FROM table1";` It seems strings are not concatinated properly. Try this: <? $output = ""; while($arr = mysql_fetch_array($result, MYSQL_ASSOC)) { $output.='<li> <a><a href="posts.php?ID='.$arr['id'].'&type='.$arr['type'].'&name='.$arr['name'].'">'.$arr['name'].' '.$arr['location'].'</a> <br /><p>Name: '.$arr['name'].'</p> <br /><p>Type: '.$arr['type'].'</p> <br /><p>Location: '.$arr['location'].'</p> </li>'; } echo …

Member Avatar for |-|x
0
228
Member Avatar for azdonald

<? $mtn = array('08034', '08035', '08036','08037'); $rand_key = array_rand($mtn,1); echo $mtn[$rand_key]; ?>

Member Avatar for vibhaJ
0
132
Member Avatar for hwoarang69

You have blank space in host name. Also add `$mail->SMTPDebug = 2; ` in your code for debugging. $mail->SMTPDebug = 2; // enables SMTP debug information (for testing) // 1 = errors and messages // 2 = messages only $mail->SMTPAuth = true; // enable SMTP authentication $mail->SMTPSecure = "ssl"; // …

Member Avatar for vibhaJ
1
8K
Member Avatar for Transcendent

Are you checking in local system? You won't receive email without SMTP. Once you upload this to LIVE you will get emails.

Member Avatar for diafol
0
227
Member Avatar for hwoarang69

Which PHPMailer version you are using?? It seems old. Try to download latest package from [http://phpmailer.worxware.com/](http://phpmailer.worxware.com/)

Member Avatar for hwoarang69
0
683
Member Avatar for hwoarang69

You can not use session during forget password. Also you can only use email for checking: <? $email = $_POST['email']; $queryget = mysql_query("SELECT username FROM user WHERE email = '$email'") or die("query didnt work"); $num_rows = mysql_num_rows($queryget); if($num_rows > 0) { $row = mysql_fetch_assoc($queryget); $username = $row['username']; // Send email …

Member Avatar for vibhaJ
0
127
Member Avatar for BoB3R

Try this: $sql="UPDATE users SET userid = '$_POST[userid]', firstname = '$_POST[firstname]', lastname = '$_POST[lastname]', email = '$_POST[email]', username = '$_POST[username]', password = '$_POST[password]', role = '$_POST[role]' WHERE condition = 'value'";

Member Avatar for BoB3R
0
173
Member Avatar for mariaceline_21
Member Avatar for satlok777

ob_start() must be before session_start(). <?php ob_start(); session_start(); And make sure there is no blank space before session_start().

Member Avatar for vibhaJ
0
106
Member Avatar for trektrak

If you want to check that session's value on other pages, i.e. if user is logged in or not, then you have to add it on all top of page.

Member Avatar for vibhaJ
0
200
Member Avatar for yanwick
Member Avatar for vijayram

Try this:: <div class="planbooks"> <b><?php echo date(" 'F 'y") ?></b> <table width="100%" border="0" cellspacing="1" cellpadding="5"> <?php $grid = 12; $cnt = 0; foreach ($planbooks as $planbook): if($cnt==0 || $cnt%$grid==0) echo '<tr>'; ?> <td><div id="planbook-content" class="float" > <a class="musttry" href="#" onclick="musttry_add()" >MustTry</a> <div><img src="/uploads/planbook/<?php echo $planbook['photo'] ?>" alt="" /></div> <div> <span …

Member Avatar for vibhaJ
0
176
Member Avatar for Shougat

> >"; <? while($row = mysql_fetch_array($result)) { ?> <tr> <td><?php echo $row['ID']; ?></td> <td><input name="txtf" type="text"></td> <td><input name="txtf1" type="text" /></td> <td><input name="txtf2" type="text" /></td> </tr> <? } ?>

Member Avatar for broj1
0
462
Member Avatar for my3h

Check what `echo "<tr><td>".$row['FileName']."</td>";` is showing and check if that file exist under images folder? Also is this php page is at root?

Member Avatar for my3h
0
169
Member Avatar for aecha

Your requirement is bit not clear. Just a guess. When you add language bt clicking submit button, you need to use insert query. While on page listing you need to use select query to fect all records from database.

Member Avatar for vibhaJ
-1
142
Member Avatar for vijayram

Ready script: [http://www.geertdedeckere.be/shop/thumbsup/](http://www.geertdedeckere.be/shop/thumbsup/)

Member Avatar for vibhaJ
0
77
Member Avatar for Kewne
Member Avatar for mariaceline_21

You should disable notice. Add below line on top of your php page. error_reporting(0); You can also disable warnings globally by changing in [php.ini](http://php.about.com/od/troubleshooting/qt/php_error_reporting.htm) file.

Member Avatar for mariaceline_21
0
231
Member Avatar for mariaceline_21

Add `isset` for session. if (isset($_SESSION['username'])) echo "Hello ".$_SESSION['username']." â™”<a href='logout.php'> Logout </a> ";

Member Avatar for vibhaJ
0
102
Member Avatar for mariaceline_21
Member Avatar for kelvinejimogu

Add below line in top of php code. You can also set this value from php.ini. `date_default_timezone_set('America/New_York');`

Member Avatar for kelvinejimogu
0
182
Member Avatar for cartergarth

[http://www.the-art-of-web.com/php/dataexport/](http://www.the-art-of-web.com/php/dataexport/)

Member Avatar for almostbob
0
206
Member Avatar for timwhelan

You can do it easily using jQuery. Once page is loaded change class using jQuery.

Member Avatar for diafol
0
148
Member Avatar for Jake.20

If you are working in local system, mail function will not work due to SMTP. Once you upload it on live server it will work as most live server have SMTP default set.

Member Avatar for fobos
0
227
Member Avatar for dany12

> help as quick as possible > Thank you [http://www.phpeasystep.com/phptu/6.html](http://www.phpeasystep.com/phptu/6.html)

Member Avatar for dany12
0
304
Member Avatar for veledrom

What is the need of mediator page 2? If you still want page 2, as diafol told you on [http://www.daniweb.com/web-development/php/threads/422848/read-a-file-content-without-uploading-it-to-the-server](http://www.daniweb.com/web-development/php/threads/422848/read-a-file-content-without-uploading-it-to-the-server) you need to read file data first on page 2 and then use it as a hidden var and pass it to page 3.

Member Avatar for veledrom
0
258
Member Avatar for kukula

Add below code in htaccess file and remove rest code. RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

Member Avatar for kukula
0
201
Member Avatar for rkumaram

Try this: <html> <head> <title>Demo</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <style type="text/css"> .shortdesc{ color:red;} .fulldesc{ color:green; display:none;} </style> </head> <body> <table> <?php for($count=1; $count<=10; $count++) {?> <tr id="short<?=$count?>" onClick="$('#full<?=$count?>').toggle("slow");;" class="shortdesc"><td><?=$count?> Short description</td></tr> <tr id="full<?=$count?>" class="fulldesc"><td>My Name is <?=$count?> and this is full description </td></tr> <?php } ?> </table> </body> </html>

Member Avatar for rkumaram
0
230
Member Avatar for UFO Disko

Change your while loop with following code: <? $cnt = 1; while($row = mysql_fetch_array($result)) { ?> <p class="numblocks num-1"> <? echo $cnt.' - '.$row['chanson'].', '.$row['artiste']; $cnt++; ?> </p> <? } ?>

Member Avatar for vibhaJ
0
50
Member Avatar for riahc3

Check this post for examples. [http://www.daniweb.com/web-development/php/threads/369623/syntax-prpblems#post1588766](http://www.daniweb.com/web-development/php/threads/369623/syntax-prpblems#post1588766)

Member Avatar for vibhaJ
0
149
Member Avatar for mogaka

> n, i get results.what is the problem ? the variable $sku is already asigned from another table. Have you echo query? And does echoed query work in phpmyadmin?

Member Avatar for seslie
0
66
Member Avatar for coleguitajuan

Try this code: function getRandomString($length=5) { $characters = '0123456789abcdefghijklmnopqrstuvwxyz'; $string = ''; for($i = 0; $i < $length; $i++) { $string .= $characters[mt_rand(0, strlen($characters))]; } return $string; } $number = getRandomString($_POST[max]);

Member Avatar for vibhaJ
0
166
Member Avatar for HasNor

When you echo details on page use nl2br function. `echo nl2br($detail);`

Member Avatar for HasNor
0
95
Member Avatar for nikoerror

When you are using string concatination in PHP you need to take care of starting and ending quotes and it's type. [Check this link for more detail](http://www.daniweb.com/web-development/php/threads/369623/syntax-prpblems#post1588766)

Member Avatar for nikoerror
0
182
Member Avatar for vijayram
Member Avatar for vijayram
0
173
Member Avatar for pbracing33b

You forgot " after name password. `<tr><h3 class="website">Please enter your Password<input type = "password" name="password"/>` 1. If you want to use session in any of php page make sure you add session_start(); at top of page. 2. Whe username is correct you can set it in session i.e. $_SESSION['username'] = …

Member Avatar for veedeoo
0
224
Member Avatar for athulram

If you delete sample and source folder from ckeditor almost 3.5+ size will be reduced. There is no use of these 2 folder.

Member Avatar for veedeoo
0
336
Member Avatar for Buppy

SELECT * FROM tbl_test WHERE id IN ( 23,4,56,21,9) ORDER BY FIELD( id,23,4,56,21,9 )

Member Avatar for vibhaJ
0
89
Member Avatar for dualzNZ

We have done this in past but in flash + php. I am also looking for answer if anyone have solution.

Member Avatar for pritaeas
0
119
Member Avatar for cali_dotcom

Not much experience in this, but better to convert all to mysql. Because 2 databse handeling may be difficult and also mssql doesn't not provide all functionality like mysql. e.g. you can not use limit in mssql.

Member Avatar for pritaeas
0
190
Member Avatar for kutchbhi

I am going search filter via GET parameters. Below is the code. Try this: <? function getCurrPageUrl($unset=array()) { $currPageName = basename($_SERVER['PHP_SELF']); $arr = $_GET; foreach($unset as $one) { unset($arr[$one]); } return $url = $currPageName.'?'.http_build_query($arr); } ?> <a href="<?=getCurrPageUrl(array('category'));?>&category=mobile">Category</a> <a href="<?=getCurrPageUrl(array('price'));?>&price=100">Price</a> <a href="<?=getCurrPageUrl(array('color'));?>&color=black">Color-black</a> <a href="<?=getCurrPageUrl(array('color'));?>&color=white">Color-white</a> Each time you click on any …

Member Avatar for vibhaJ
0
140
Member Avatar for rambo12

Below function will return random string. <? function getRandomString($length=6) { $characters = '0123456789abcdefghijklmnopqrstuvwxyz'; $string = ''; for($i = 0; $i < $length; $i++) { $string .= $characters[mt_rand(0, strlen($characters))]; } return $string; } echo getRandomString(10); ?>

Member Avatar for vibhaJ
0
177
Member Avatar for guidely

Use join for good practice: "SELECT roomrent.* FROM `roomrent` LEFT JOIN guests ON guests.id = roomrent.guest_id WHERE `room_id`='$_REQUEST[id]' AND `checkout_datetime`='0000-00-00 00:00:00' AND `id`='$_REQUEST[roomrent_id]' ORDER BY `id` DESC" Also why are you updating in whle loop? Where is the code for inserting into table?

Member Avatar for guidely
0
117
Member Avatar for ak47carbon
Member Avatar for mogaka

No need to write such lengthy code. Check parse_url function [Click Here](http://php.net/manual/en/function.parse-url.php)

Member Avatar for diafol
0
132
Member Avatar for imstella
Member Avatar for imstella
0
197

The End.