619 Posted Topics
Re: Wherever you are using `$_GET'tm'] ` use ` isset($_GET['tm']) `before it as shown below `if(isset($_GET['tm']) && $_GET['tm']...something..)` | |
Re: 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");` | |
Re: You mean your search is working fine, but you just need to arrange search result list.. Is it right?? | |
Re: What is datatype of *image* field in mysql table? | |
Re: 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 … | |
Re: <? $mtn = array('08034', '08035', '08036','08037'); $rand_key = array_rand($mtn,1); echo $mtn[$rand_key]; ?> | |
Re: 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"; // … | |
Re: Are you checking in local system? You won't receive email without SMTP. Once you upload this to LIVE you will get emails. ![]() | |
Re: Which PHPMailer version you are using?? It seems old. Try to download latest package from [http://phpmailer.worxware.com/](http://phpmailer.worxware.com/) | |
Re: 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 … | |
Re: 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'"; | |
Re: Have you set `img` field as a primary key? | |
Re: ob_start() must be before session_start(). <?php ob_start(); session_start(); And make sure there is no blank space before session_start(). | |
Re: 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. | |
Re: Clear all cookies in browser and then check. | |
Re: 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 … | |
Re: > >"; <? 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> <? } ?> | |
Re: 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? | |
Re: 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. | |
Re: Ready script: [http://www.geertdedeckere.be/shop/thumbsup/](http://www.geertdedeckere.be/shop/thumbsup/) | |
Re: 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. | |
Re: Add `isset` for session. if (isset($_SESSION['username'])) echo "Hello ".$_SESSION['username']." â™”<a href='logout.php'> Logout </a> "; | |
Re: Add below line in top of php code. You can also set this value from php.ini. `date_default_timezone_set('America/New_York');` | |
Re: [http://www.the-art-of-web.com/php/dataexport/](http://www.the-art-of-web.com/php/dataexport/) | |
Re: You can do it easily using jQuery. Once page is loaded change class using jQuery. ![]() | |
Re: 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. | |
Re: > help as quick as possible > Thank you [http://www.phpeasystep.com/phptu/6.html](http://www.phpeasystep.com/phptu/6.html) | |
Re: 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. | |
Re: 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] | |
Re: 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> | |
Re: 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> <? } ?> | |
Re: 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) | |
Re: > 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? | |
Re: 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]); | |
Re: When you echo details on page use nl2br function. `echo nl2br($detail);` | |
Re: 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) | |
Re: At line no 79. ` $this->$planbooks->getPlanbook();` should be `$this->planbooks->getPlanbook();` | |
Re: 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'] = … | |
Re: If you delete sample and source folder from ckeditor almost 3.5+ size will be reduced. There is no use of these 2 folder. | |
Re: SELECT * FROM tbl_test WHERE id IN ( 23,4,56,21,9) ORDER BY FIELD( id,23,4,56,21,9 ) | |
Re: We have done this in past but in flash + php. I am also looking for answer if anyone have solution. | |
Re: 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. | |
Re: 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 … | |
Re: 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); ?> | |
Re: 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? | |
Re: No need to write such lengthy code. Check parse_url function [Click Here](http://php.net/manual/en/function.parse-url.php) ![]() | |
Re: Is your text input name is `contact[first_name]` ?? Post your form code. |
The End.