|
I would write it like so:
$SQL = "SELECT * FROM empComm WHERE name = '".$empUserName."'";
and make sure no spaces sneak in.
If that doesn't work, I'd seriously doubt your database content, so print out empComm.name (both string value and string length) for a visual check.
|
|
|
|
|
Dude,
You have made a classic mistake. Very funny.
It is
if($db_field['name'] = $empUserName){echo "match<br />";}
and it should be
if($db_field['name'] == $empUserName){echo "match<br />";}
few more things,
make sure your Query execution is successfull.
so the line should be
$result = mysql_query($SQL) or die("Error In Query :".$SQL."<br>".mysql_error());
|
|
|
|
|
$SQL = "SELECT * FROM empComm WHERE name = '".$empUserName."'";
Is the correct Answer
Thanks & Regards
Arya1685
“You are not only responsible for what you say, but also for what you do not say”
|
|
|
|
|
needed to develop a website of free songs download with required features
1) speed of site necessary (site must not be heavy loaded)
2) good look 'n feel
3) good cms
4) proper ad management in cms
5) some examples www.djmaza.com , www.songs.pk , www.hungama.com etc
kindly suggest me the price of the project
as well as if any one wishes to freelance
then kindly contact me...
thanks..
|
|
|
|
|
Hi,
I really need a php script that checks invisibles on Yahoo messenger....
some websites that does this are listet below:
http:
http:
http:
If anyone can give me a php script for doing this I would really appreciate it
Best Regards
|
|
|
|
|
I want to create a class for reading mailbox in php code. How many parameter are there I need?
sample class maillist that get from gmail. thank for help!
|
|
|
|
|
yornsocheat wrote: How many parameter are there I need?
Need for what? As the designer this is a question for you. However, some of these[^] may help you decide.
|
|
|
|
|
First thing, you need to know what you need to create??
1. You need to create a pop3 client. Its possible using php.
2. as you are planning to access gmail account, in that case you also need to implement ssl communication so that you can read the data actually,
As a matter of fact you can create a global pop client that will be able to access any pop server.
|
|
|
|
|
|
هر کی سورس کد می خواهد بگه من در خدمتم سورس کدهای که به ذهنتون هم نماید
|
|
|
|
|
Please post in English only.
الرجاء نشر باللغة الانكليزية فقط
|
|
|
|
|
leading by example, are we?
|
|
|
|
|
|
Hi,
I'm new in PHP.
define('BUFSIZ', 4095);
$url = $_GET["addr"];
$msk = $_GET["key"];
$msklen = count($msk);
$rfile = fopen($url, 'r');
$lfile = fopen(basename($url), 'w');
while(!feof($rfile))
{
$content = fread($rfile, BUFSIZ);
while($i=0; $i < BUFSIZ; $i++)
$content[$i] = $content[$i] ^ &msk[$i % count($msk)];
fwrite($lfile, $content, BUFSIZ);
}
fclose($rfile);
fclose($lfile);
this code is not working after performing towice in a file my file will be change.
what is wrong with my while statement?
thanks.
No Comment.
|
|
|
|
|
One thing that struck me when reading your code is you don't care about the actual length of the file: you request a read of 4095, however the file length could be more (in which case you ignore the extra data), or less in which case you are looping over non-existing bytes. The $i < BUFSIZ test is bound to be wrong.
|
|
|
|
|
Hi,
You are right but this might cause some data error in last block of file but my problem is that i have file changing data in whole entire of my file. Let ignore last block, in other block we shoud have any problem in converting file towice but there is some problem.
This code in c++ working well but in php i don't know what happen if I accesing my data with index ([$i]) and change it with xor operation it looks that my original data will be growup.
thanks
No Comment.
|
|
|
|
|
Hi,
I looked a bit closer, here is your code again, then my comments:
1 define('BUFSIZ', 4095);
2 $url = $_GET["addr"];
3 $msk = $_GET["key"];
4 $msklen = count($msk);
5 $rfile = fopen($url, 'r');
6 $lfile = fopen(basename($url), 'w');
7 while(!feof($rfile))
8 {
9 $content = fread($rfile, BUFSIZ);
10 while($i=0; $i < BUFSIZ; $i++)
11 $content[$i] = $content[$i] ^ &msk[$i % count($msk)];
12 fwrite($lfile, $content, BUFSIZ);
13 }
14 fclose($rfile);
15 fclose($lfile);
1.
your code does not compile, there are several mistakes.
2.
line 10 is wrong; a while statement takes one argument, you intended to use a for loop?
3.
line 11: &msk needs a dollar sign, not an ampersand.
4.
line 11: you can't silently convert a character to an integer; when you want the ASCII index of a character, use the ord function[^]. The reverse operation is performed using the chr function[^].
Finally, here is some code that might help you:
function par($string) {
echo "<p>$string</p>\n";
}
function hexdump($title, $filename1) {
$BUFSIZ=20;
$hex="0123456789ABCDEF";
$dump="";
$rfile = fopen($filename1, 'r');
$content = fread($rfile, $BUFSIZ);
$len=strlen($content);
for($i=0; $i < $len; $i++) {
$val=ord($content[$i]);
$dump=$dump." ".$hex[$val/16].$hex[$val%16];
}
par("");
par($title);
par($dump);
}
|
|
|
|
|
Hi,
Thanks alot. That was very helpful.
No Comment.
|
|
|
|
|
How can I prevent click jacking in php?
I just have the concept of click jacking , If i implement click jacking in php from code search from internet , then how can i know it is implemented? Kindly clear my concept and tell me Click-Jacking Preventing demo Code in php...
I am waiting for your positive and Quick response...
Thanks....
|
|
|
|
|
I think best solution for you to make sure that your webserver is well protected.
|
|
|
|
|
How r u dear frnds?
can anybody help to create currency converter using PHP & rates automatically update??
MAT
|
|
|
|
|
|
I wouldn't worry about a PHP currency converter, but about the missing keyboard-keys, if I was you.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Currently I'm develop an application same as CRM. To generate report in PDF,i'm using FPDF as my tools. The problem is, to retrieve the data from database,I create temporary file e.g:dldata.php and call that page in my pdf viewer file. U can access the data and easily view the actual data(if you know the address).By using explode(),I retrieve the data and display it on my pdf viewer page. The dldata.php will be delete (using unlink()) after user load the quotation form. Below are the flow to create quotation in pdf:
fill form data(createquotation.php)->insert data to database->create session,dldata.php & write data into it from mysql->redirect page to viewquotation.php(here I call dldata.php)->click print quotation or back to createquotation.php & destroy dldata.php. Anyone that have experience using FPDF to advise me about this issue. I'm afraid the conflict arise when 2 or more users doing the same process at the same time. TQ.
|
|
|
|
|
What is your actual problem?
Creating the PDF File?
or
Downloading the PDF File?
|
|
|
|