- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 4
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Professional Geek
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 … | |
Re: 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. | |
Re: 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] | |
Re: 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 … | |
Re: [I think I can .. I think I can .. I think I can ..] | |
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 … | |
Re: 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, > > … | |
Re: 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. | |
Re: 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. | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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] | |
Re: Nevermind what I said do what Petr.Pavel says :D | |
Re: 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']; … | |
Re: 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 … | |
Re: 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. | |
Re: Is this for a local test system or are you deploying this to real world? | |
Re: 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 … | |
Re: Do you get any errors besides the fact that the index.php file is not created? | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
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 … | |
Re: 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] | |
Re: 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 … | |
Re: 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 … | |
Re: 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. | |
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. |