Posts
 
Reputation
Joined
Last Seen
Ranked #248
Strength to Increase Rep
+11
Strength to Decrease Rep
-2
94% Quality Score
Upvotes Received
127
Posts with Upvotes
123
Upvoting Members
68
Downvotes Received
8
Posts with Downvotes
8
Downvoting Members
7
50 Commented Posts
~264.78K People Reached
Favorite Tags

619 Posted Topics

Member Avatar for danny4444

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 …

Member Avatar for Rick_15
0
3K
Member Avatar for mehrantahir
Member Avatar for noelpasia

[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` = '" . …

Member Avatar for FOURATI
0
3K
Member Avatar for coleguitajuan

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=''; …

Member Avatar for coleguitajuan
0
1K
Member Avatar for meazza

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.

Member Avatar for Rashid_4
0
9K
Member Avatar for oliprik

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.

Member Avatar for diafol
0
3K
Member Avatar for 080346

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]

Member Avatar for edisath
0
229
Member Avatar for shahiduop

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"> <? …

Member Avatar for pushpatiwari
0
2K
Member Avatar for Viruthagiri

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" …

Member Avatar for Saad Awan
0
592
Member Avatar for jacksantho

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 …

Member Avatar for tapananand
0
793
Member Avatar for camillee

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]

Member Avatar for diafol
0
5K
Member Avatar for tejasluvs

[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 …

Member Avatar for nitinr
0
881
Member Avatar for rajalakshmi2810
Member Avatar for aMOEBa

This can be done using java script. [CODE] <a href="whatever.htm" onClick="window.print();return false"><img src="print.gif"></a> [/CODE]

Member Avatar for geoamins2
0
223
Member Avatar for vibhaJ

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 …

Member Avatar for vibhaJ
0
200
Member Avatar for jrotunda85

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]

Member Avatar for bakhtn
0
2K
Member Avatar for vibhaJ

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..

Member Avatar for diafol
1
338
Member Avatar for pjh1985

echo your login select query and try to debug it. md5 is just for encryption there might be some issue in coding.

Member Avatar for aareyes00
0
5K
Member Avatar for vizz

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?

Member Avatar for vizz
0
440
Member Avatar for just.irwan

You need to work on mysql queries. No one can help you without your database structure.

Member Avatar for diafol
-3
119
Member Avatar for BadManSam

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{ …

Member Avatar for vibhaJ
0
125
Member Avatar for vijayram

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?

Member Avatar for vibhaJ
0
188
Member Avatar for laura301019

<? if(form is submitted) { $transportAll = $_POST['transport']; foreach($transportAll as $transport) { echo '<br />You have selected:'.$transport; } echo '<br />Total:'.count($transportAll); } ?>

Member Avatar for vibhaJ
0
119
Member Avatar for tim-work

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 …

Member Avatar for vibhaJ
0
188
Member Avatar for hwoarang69
Member Avatar for Joshuamandrew
0
188
Member Avatar for dani0

> 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.

Member Avatar for vibhaJ
0
175
Member Avatar for Venom Rush
Member Avatar for blaaam

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 …

Member Avatar for blaaam
0
364
Member Avatar for dagtad
Member Avatar for ehpratah

As blocblue says you can set timezone. If you have access of php.ini, you can also set timezone in directly php.ini.

Member Avatar for ehpratah
0
2K
Member Avatar for Kniggles

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 …

Member Avatar for Kniggles
0
265
Member Avatar for sigit_p

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.)

Member Avatar for sigit_p
0
216
Member Avatar for HasNor

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.

Member Avatar for vibhaJ
0
97
Member Avatar for HasNor
Member Avatar for HasNor
0
235
Member Avatar for garyrichard

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/)

Member Avatar for veedeoo
0
576
Member Avatar for ettypaldos

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, …

Member Avatar for johns1982
0
5K
Member Avatar for dschuett

What do you mean by **corrupt**?? Are you uploading image file, how do you know file is corrupted? Also check both file's size.

Member Avatar for dschuett
0
132
Member Avatar for trektrak

http://php-login-script.com/ http://www.webdesign.org/web-programming/php/register-login-script.8721.html

Member Avatar for vibhaJ
0
183
Member Avatar for prvnkmr449

Make sure you don't sent anything on browser before you use session_start. Is there any blank space before code start?

Member Avatar for Szabi Zsoldos
0
419
Member Avatar for mbarandao

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 …

Member Avatar for mbarandao
0
203
Member Avatar for salii

what is error line number? Also for testing remove all comments once and then try.

Member Avatar for salii
0
1K
Member Avatar for divyakrishnan

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/)

Member Avatar for divyakrishnan
0
2K
Member Avatar for newbie1234

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.

Member Avatar for broj1
0
151
Member Avatar for divyakrishnan

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.

Member Avatar for vibhaJ
0
352
Member Avatar for kimmi_baby
Member Avatar for vibhaJ
0
173
Member Avatar for HasNor

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);

Member Avatar for vibhaJ
0
104
Member Avatar for arwalters1990

Use session_start on top of page. There should be no other HTML codes, html comments or any white space.

Member Avatar for arwalters1990
0
342
Member Avatar for riahc3
Member Avatar for vibhaJ

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 …

Member Avatar for vibhaJ
0
145
Member Avatar for riahc3

You have to use . (dot) for concatenation and not +. So this: echo ('result es ' + $result); Should be echo ('result es '. $result);

Member Avatar for riahc3
0
726

The End.