- Strength to Increase Rep
- +11
- 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
619 Posted Topics
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 = '[email protected]'; $fromName = 'Administrator'; $fromEmail = '[email protected]'; $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. | |
Re: You can use Ajax. Once page is loaded at user side and then you want any php operation without page load you can use ajax. Below is sample code. You need to include jQuery file to run it. By default show only one pic. When user click on button call … | |
Re: Make sure you have proper src to show image in browser. Your src can be relative or absolute. 1) http://localhost/nseries/A2-1C1-1B.png OR 2) nseries/A2-1C1-1B.png (considering php page running this code is placed beside nseries folder.) | |
Re: I think you should add `$_SESSION['timeout'] = time(); ` inside ` if(isset($_SESSION['timeout'])) { `condition. Once your session expires and you are redirected back to index.php again you will have $_SESSION['timeout'] set with time(); So you can redirect back anywhere. | |
Re: post your code.nobody can assist you without looking in your code. | |
Re: Learn from this link and then post if you have issue. [http://remysharp.com/2007/01/20/auto-populating-select-boxes-using-jquery-ajax/](http://remysharp.com/2007/01/20/auto-populating-select-boxes-using-jquery-ajax/) | |
Re: You can also have one single ajax function and pass both user and sex parameter on ajax request. [CODE] <html> <head> <script type="text/javascript"> function showUser() { var users = document.getElementById('users').value; var sex = document.getElementById('sex').value; if (users=="" && sex=="") { document.getElementById("txtHint").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, … | |
Re: What do you mean by **corrupt**?? Are you uploading image file, how do you know file is corrupted? Also check both file's size. | |
Re: http://php-login-script.com/ http://www.webdesign.org/web-programming/php/register-login-script.8721.html | |
Re: Make sure you don't sent anything on browser before you use session_start. Is there any blank space before code start? | |
Re: Are you displaying this category values from database? **If yes,** then when numeric values are posted after form submission, you need to fetch value of category from database using posted numeric id. **If no,** you can directly use text as a value. > Making the value equal to the text … | |
Re: what is error line number? Also for testing remove all comments once and then try. | |
Re: Yes. You need to create new .htaccess file and place it at root of your project. There are many sites which can create code for htaccess. Personally i like this site: [http://www.generateit.net/mod-rewrite/](http://www.generateit.net/mod-rewrite/) | |
Re: On login page you need to check session. If it is set then you need to redirect user to home page as shown below. if(!isset($_SESSION['Memberid'])){ header("Location: home.php"); } Also make sure session_start() should be in top of page.You can add session_start() in database_connection.php file. | |
Re: I am not sure if you can access via this. But can you have access of image storage of other machine? If yes you can save image in wamp folder. | |
Re: Replace <<div class="textrightblog"> With <div class="textrightblog"> | |
Re: You can use below function for filtering data before inserting in database. function filter($data) { $data = trim(htmlentities(strip_tags($data))); if (get_magic_quotes_gpc()) $data = stripslashes($data); $data = mysql_real_escape_string($data); return $data; } $filename = filter($filename); | |
Re: Use session_start on top of page. There should be no other HTML codes, html comments or any white space. | |
Re: post your code. | |
Hi Friends, I want to develop a website like file manager. Where user register and will get fix disk space lets say 20MB. Now user can upload their pdf, doc, txt, jpeg etc files upto their disk limit. I can develop upto this using PHP. Now my issue is if … | |
Re: You have to use . (dot) for concatenation and not +. So this: echo ('result es ' + $result); Should be echo ('result es '. $result); |
The End.