- Strength to Increase Rep
- +10
- Strength to Decrease Rep
- -2
- Upvotes Received
- 127
- Posts with Upvotes
- 123
- Upvoting Members
- 68
- Downvotes Received
- 8
- Posts with Downvotes
- 8
- Downvoting Members
- 7
Re: I was also facing so many issues for mail attachment. Finally i end up with this. I have made this function, hope this helps you. [CODE] <?php //======================================= // mail sending start //======================================= $to = 'vibha@domainname.com'; $fromName = 'Administrator'; $fromEmail = 'admin@domainname.com'; $subject = 'Subjest is here'; $message = 'Message … | |
Re: Are you sure your image src points to valid image? | |
Re: [QUOTE=noelpasia;1577222]if(isset($_GET['advance_searching']) && !empty($_GET)){ $where = ""; if($_POST['search_remarks']!="") { $s[] = "`process` = '" . mysql_real_escape_string($_POST['search_remarks']) . "'"; } if($_POST['search_industry']!="") { $s[] = "`process` = '" . mysql_real_escape_string($_POST['search_industry']) . "'"; } if($_POST['search_position']!="") { $s[] = "`process` = '" . mysql_real_escape_string($_POST['search_position']) . "'"; } if($_POST['search_location']!="") { $s[] = "`process` = '" . … | |
Re: Try this. [CODE] <script type="text/javascript"> window.onload=function() { if (document.getElementById("country")) { document.getElementById("country").onchange=function() { switchme(this); } } } function switchme(SNewSel) { var ind = SNewSel.selectedIndex; var txt = document.getElementById('country_code'); switch (ind) { case 1: txt.value = "+93"; break; case 2: txt.value = "+358"; break; case 3: txt.value = "+355"; break; default: txt.value=''; … | |
Re: You can not get labels after form submission. You can create hidden type field and value can be same as label, then when form submitted you can get hidden field value for labeling. | |
Re: Try 'U' in small case. [CODE] echo $sql = "SELECT [B]u[/B]sername FROM login_tbl WHERE username='".$username."' and password='".$password."'"; $result = mysql_query($sql, $connectID); [/CODE] If it still not works then run echoed query in phpmyadmin. | |
Re: In php you can do this by ffmpeg. You need to install it in server. Check this : [URL="http://lmgtfy.com/?q=ffmpeg+php+tutorial"]http://lmgtfy.com/?q=ffmpeg+php+tutorial[/URL] | |
Re: Here i have written complete code. Try it, its easy to understand. [CODE] <? mysql_connect('localhost','root',''); mysql_select_db('test'); if(isset($_REQUEST['delete'])) { $deleteCb = $_REQUEST['deleteCb']; for($i=0;$i<count($deleteCb);$i++) { $news_id = $deleteCb[$i]; $q = "delete from newslist where news_id= ".$news_id; mysql_query($q); } header("location:test.php"); exit; } ?> <form name="form" id="form" method="post"> <table width="400" border="1" cellspacing="0" cellpadding="0"> <? … | |
Re: Here is code for index.php. check it, hope it is what you want. [CODE] <?php //File Snatcher 2.7 define('_ALLOWINCLUDE',0); include 'setting.php'; $version = '2.7'; ////////////////////////////////////////////// //Do Not Change Below Here//////////////////// ////////////////////////////////////////////// if (function_exists('curl_init')) { $snatch_system = 'curl'; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <link rel="stylesheet" … | |
Re: Below is not a complete code,it is just a logic. Try to implement at your end. [CODE]<select name="dropd" id="dropd"> <option value=""> - - Select - -</option> <? if(manager is logged in) { $res = select manager list from database while($rs = mysql_fetch_assoc($res)) { ?> <option value="<?=$rs['manager-id']?>"><?=$rs['manager-name']?></option> <? } } if(employee … | |
Re: You can use js code in echo statement, Logic: [CODE] <? if(! valid username or password) { echo '<script language="javascript">alert("Please enter valid username and password");</script>'; header("Location:currentpage.php"); exit; } else { //--- continue..... } ?> [/CODE] | |
Re: [CODE] <?php define("MAJOR", 'pounds'); define("MINOR", 'p'); class toWords { var $pounds; var $pence; var $major; var $minor; var $words = ''; var $number; var $magind; var $units = array('','one','two','three','four','five','six','seven','eight','nine'); var $teens = array('ten','eleven','twelve','thirteen','fourteen','fifteen','sixteen','seventeen','eighteen','nineteen'); var $tens = array('','ten','twenty','thirty','forty','fifty','sixty','seventy','eighty','ninety'); var $mag = array('','thousand','million','billion','trillion'); function toWords($amount, $major=MAJOR, $minor=MINOR) { $this->major = $major; $this->minor … | |
Re: Is your php short tag is open in php.ini? | |
Re: This can be done using java script. [CODE] <a href="whatever.htm" onClick="window.print();return false"><img src="print.gif"></a> [/CODE] | |
I have mobile web services written in PHP. Ant it is running on Apache Linux. Suddenly since yesterday our server became too slow. We found the reason that there are many continuous connection is coming to our server. Which is engaging bandwidth and making server slow. We have asked hosting … | |
Re: I use below logic. In login form place a new hidden field which will have user's current location with query parameter. [CODE] <input type='hidden' name='page' value='<?=basename($_SERVER["PHP_SELF"]).'?'.$_SERVER["QUERY_STRING"]?>' /> [/CODE] In php side coding use below redirection. [CODE] header('location:'$_POST['page']); [/CODE] | |
I was struggling long for proper image resize function for maintaining image ratio. Finally i end end up with merging and changing all codes and it works ! function resizeImage($sourceFile,$destFile,$width,$height) sourceFile => Full path along with filename destinationFile => Full path along with filename I hope this will help coders.. | |
Re: echo your login select query and try to debug it. md5 is just for encryption there might be some issue in coding. | |
Re: As pritaeas says, have you tried simple htaccess rule?? like below? # This allows you to redirect your entire website to any other domain Redirect 301 / http://www.google.com/ First of all check if htaccess is working in your server or not? | |
Re: You need to work on mysql queries. No one can help you without your database structure. | |
Re: From Google... <?php // ------------------------------------------------------------ function recursive_remove_directory($directory, $empty=FALSE) { if(substr($directory,-1) == '/') { $directory = substr($directory,0,-1); } if(!file_exists($directory) || !is_dir($directory)) { return FALSE; }elseif(is_readable($directory)) { $handle = opendir($directory); while (FALSE !== ($item = readdir($handle))) { if($item != '.' && $item != '..') { $path = $directory.'/'.$item; if(is_dir($path)) { recursive_remove_directory($path); }else{ … | |
Re: From getParameter function it seems meetnewpeopleId should be passed to url. i.e. yourpage.php?meetnewpeopleId=177 Are you passing meetnewpeopleId in url or any object? | |
Re: <? if(form is submitted) { $transportAll = $_POST['transport']; foreach($transportAll as $transport) { echo '<br />You have selected:'.$transport; } echo '<br />Total:'.count($transportAll); } ?> | |
Re: 1) First of all make sure all your href should have seo url, which you finally want i.e. fullnews.php/123/This-is-the-Headline So below code will make such href. function seo($input){ $input = mb_convert_case($input, MB_CASE_LOWER, "UTF-8"); //convert UTF-8 string to lowercase $a = array('č','ć','ž','đ','š'); $b = array('c','c','z','dj','s'); //$input = strtr($input, "čćžđšè", "cczdse"); not … | |
Re: [http://www.phpeasystep.com/phptu/6.html](http://www.phpeasystep.com/phptu/6.html) | |
Re: > ORDER BY RAND() ORDER BY RAND() will do the same thing. Better to use it instead of 4 line coding. For better practice when things are possible from mysql query better to use it directly instead of 2-3 php operation. | |
Re: Try this: <form method="post" autocomplete="off"> | |
Re: Below is two functions which can be used for insert and update tables. When you have large table you can try it, you need to pass array to function as shown in example. I know it is off to your question but this code may help you. <? //======= function … | |
Re: Post your code. | |
Re: As blocblue says you can set timezone. If you have access of php.ini, you can also set timezone in directly php.ini. |