Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
4
Posts with Upvotes
4
Upvoting Members
4
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
4 Commented Posts
~20.4K People Reached
About Me

Professional Geek

Favorite Tags
Member Avatar for JRSofty

This class allows for the handling of normal and serialized cookies as well as switching between these types of cookies. Cookie Functions: Write Cookies Read Cookies Delete Cookies Use of this class is fairly simple. Step 1: Include the class source in your php project using the require or include …

Member Avatar for LastMitch
1
332
Member Avatar for wandie

Also any characters (even null or whitespace) before the opening <?php tag can also cause this error so make sure that your <?php starts at the very first line and column of your script. In particular check line 6 (cookies.php:6) to see what you have that outputs there.

Member Avatar for Ami_Bogus
0
168
Member Avatar for prawin@123

You don't have to write the function twice to call it twice, once is enough. Try something like this: [code=php] <?php function encode5t($password) { $ret = $password; for($i=0; $i<5;$i++) { $ret=strrev(base64_encode($ret)); } return $ret; } $EncOldPwd = encode5t($OldPassword); $EncNEWPwd = encode5t($NewPassword); ?> [/code]

Member Avatar for alphabeta8
0
192
Member Avatar for alicem

Here's a bit of code that might help: [code=php] <?php function recurseDir($dir){ if(is_dir($dir)){ if($dh = opendir($dir){ while(($file = readdir($dh)) !== false){ if($file != '.' && $file != '..'){ if(!is_dir($dir . $file)){ echo $dir . $file; }else{ echo $dir . $file; // since it is a directory we recurse it. recurseDir($dir …

Member Avatar for HavocAngel
0
7K
Member Avatar for vmanes
Member Avatar for JRSofty

So I decided that I would describe my attempts at developing my own Rapid Development Framework, here on DaniWeb since they are so nice to give people free blog space. So many of you are probably asking, "What exactly is a Rapid Development Framework?" A Rapid Development Framework (I'll just …

0
97
Member Avatar for csharplearner

It could be because you are using the wrong call back for the preg_replace. Here's how I've done it in the past: while(preg_match("#\[url=([^\]]+)\](.+?)\[/url\]#ies",$articledata)){ $articledata=preg_replace("#\[url=([^\]]+)\](.+?)\[/url\]#ies","BuildLinks(array('0'=>2,'1'=>'\\1','2'=>'\\2'))", $articledata); } function BuildLinks($arr){ switch($arr['0']){ case 1: $ret="<a href=mailto:{$arr['1']} rel='extern'>{$arr['2']}</a>"; break; case 2: $ret="<a href='{$arr['1']}' rel='extern'>{$arr['2']}</a>"; break; } return $ret; } > Hi all, > > …

Member Avatar for martin5211
0
511
Member Avatar for 7arouf

I'm a user of CrimsonEditor. It's pretty simple but I find it is quite good for what I need it to do. There are tons of syntax highlighting editors out there. I would suggest finding one that you like and using it.

Member Avatar for BzzBee
0
301
Member Avatar for jameswoodhouse

You have stored the image as some sort of Binary Large Object (BLOB) and want to return it to a browser as a file? Just want to make sure I understand the problem before I explain how to do this.

Member Avatar for Designer_101
0
103
Member Avatar for The Midnighter

Can we see the HTML you are using to build your form? This might clue us in on what exactly you are trying to do. If you are trying to get a link on a form to act like a button then you can add a javascript event handler to …

Member Avatar for Designer_101
0
127
Member Avatar for cyberbaffled

Designer there is no need for the ; in the httpd.conf file. However I do see another inconsistency that might be the problem. You're PHPIniDir statement uses the typical windows slash \ when it probably should use the forward slash / so basically the last line in your config should …

Member Avatar for Designer_101
0
195
Member Avatar for rajeesh_rsn

Hi Rajeesh, What you are attempting to do is kind of like producing a dynamic SQL statement. Actually it's not as hard as it seems and you are on the right path. Basically you should start with the main part of the query before the WHERE. Then gradually check what …

Member Avatar for JRSofty
0
73
Member Avatar for rajeesh_rsn

Your code is absolutely not safe! Why? Because you didn't check the user input to make sure it is clean. You are setting yourself up for an SQL injection. To help fix this at the very minimum you want to do the following before continuing with your code: Take this …

Member Avatar for Designer_101
0
125
Member Avatar for kings

You are looking for a Rich Text Editor? This is not normally handled by PHP directly but through Javascript. A couple I can think of off the top of my head: [url]http://freerichtexteditor.com/[/url] [url]http://tinymce.moxiecode.com/[/url]

Member Avatar for JRSofty
0
90
Member Avatar for maydhyam
Member Avatar for servis

His problem is quite simple actually. Here's his original code [code] $name=$_POST['name']; //from the name form $q_id=$_GET['id']; $sql="INSERT INTO `test`.`reply`(`rid`,`tid`,`name`)VALUES(NULL,'$q_id','$name')"; $result=mysql_query($sql);[/code] All he needs to do is remove the single quotes (' ') from around the $q_id in his SQL. So his new code should look like this: [code] $name=$_POST['name']; …

Member Avatar for rgviza
0
4K
Member Avatar for Scottmandoo

The trick is to make a count of the total records you want to eventually display. Divide this number by the number of items to display per page (you might want to make sure that if there is a remainder that you add an extra page). Then you build your …

Member Avatar for prethum
0
2K
Member Avatar for gehher

Beer (only German Beer no American stuff) Scotch (Not JW or Glenfidich) neat nothing to dilute the taste Some Wine but usually only with a meal when appropriate.

Member Avatar for lio04
0
301
Member Avatar for ¤| battousai |¤

Is this for a local test system or are you deploying this to real world?

Member Avatar for ¤| battousai |¤
0
142
Member Avatar for andy5000_uk15

The reason you are getting the error is because mysql sent back an error instead of a result. Most likely there is something in your SQL statement that has caused a problem. What the best thing to do is to check first if the result of the query is actually …

Member Avatar for silviuks
0
210
Member Avatar for sDJh
Member Avatar for sDJh
0
325
Member Avatar for evios

There's no built-in functions exactly for what you want to do so what you need to do is build some code of your own. First take a look at the [URL="http://www.php.net/manual/en/ref.datetime.php"]date/time functions of PHP[/URL]. If I'm going to check the month against a textual month I would use something like …

Member Avatar for JRSofty
0
105
Member Avatar for smartness

Although this is a PHP forum and your problem is HTML I'll give you the answer as I see it ;) At the bottom of your forum you have a small dropdown box that allows you to jump around to different places or maybe to change skins (I'm not sure …

Member Avatar for smartness
0
102
Member Avatar for artashh

Another question is are you attempting this from your own computer or are you working on a hosted server? If you are using a hosted server and they don't provide you with PHP then you won't be able to run it from there because most likely they won't install Apache …

Member Avatar for artashh
0
159
Member Avatar for JRSofty

Hi everyone, I'm a lazy programmer and when I want to create an array that I can store serialized in a database I don't feel like typing out all the array stuff rather I want to use a delimited string something like this: [code]access.read=1,2,3:: access.write=1,2:: access.modify=1,2:: access.manage=1:: somethingelse=10101[/code] So I …

Member Avatar for JRSofty
0
172
Member Avatar for stalk

Just because the result is valid does not mean that there are rows. It would be better to check if the result contains rows before attempting to jump to a particular one. For example [code]if(mysql_num_rows($result) >= 1){ $cena_polozky = mysql_result($result,0,"cena"); }[/code]

Member Avatar for JRSofty
0
327
Member Avatar for joker40

I would say it is a hiddeous idea honestly. This because what if there are references to the user_id in other tables? Then you would have to go through all these tables and update them to match the new settings. This can cause a lot of needless overhead for your …

Member Avatar for JRSofty
0
98
Member Avatar for bornok15

You can use Javascript to check if the text boxes actually have data, OR you can use PHP, OR you could use both. My #1 rule when dealing with user input is that I always always always check that it is valid before I start doing anything with it. So …

Member Avatar for bornok15
0
123
Member Avatar for kings

How about reposting that and removing all of the PHP and HTML and just post the SQL statements that you want to run along with a description of the originating table. This might help us to determine what the problem with your particular SQL queries are.

Member Avatar for jino
0
111
Member Avatar for JRSofty

I personally like [url="http://pcweenies.net/"]PC Weenies[/url] There's also Working Daze which isn't too bad but PC Weenies is actually my favorite.

Member Avatar for bobbytheshat
0
141