- 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
41 Posted Topics
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. | |
Re: You can also check Source Forge they might have something as well that is open source and doesn't cost. | |
Re: To learn more about PHP errors look at the manual [url]http://www.php.net/manual/en/tokens.php[/url] | |
Re: normally if you are going to use array elements inside of an SQL query string you need to put curly braces around them. [code=php]VALUES ('{$good_data['Custnombre']}')[/code] Although using array elements isn't really the best way like nav33n said above you really should assign them to regular variables. also you need to … | |
Re: To do this in VB.NET is actually fairly simple. First you will need to import the System.IO namespace and then do some chopping up of the file name. Here's some pseudo code on how to accomplish this [code] Import System.IO Sub MoveFiles() Filenames = Directory.GetFiles("C:\uploaded_files") SubBuild = "" For Each … | |
Re: Most of the sites where you find these types of items have their licensing explained. I'm not sure but I think it varies from site to site so you have to check them out carefully. | |
Hi everyone, I've got some issues with a Listview control set to LargeIconView with an ImageList control assigned to the LargeIconImageList property of the Listview. I've got the Imagelist control's image size set to 110,110. The thumbnails which are stored in a database have a MAXIMUM size of 110 x … | |
Re: You don't have the SQL Server Management Studio Express (also known as the SSMSE)? If not you want to go back to the download site and download it. I can't remember what tool pack it is. If you download the SQL Server 2005 Express Advanced package the tool will be … | |
Re: Hi, When looking at your code I saw this function in your class [code=vb.net]Public Function Opends(ByVal Query As String) As DataSet Try daobj = New OleDbDataAdapter dsobj = New DataSet MsgBox(cn.State) daobj.SelectCommand = New OleDbCommand("Select * from master", cn) daobj.Fill(dsobj) MsgBox(dsobj.Tables.Count) Return dsobj Catch ex As Exception Return dsobj MessageBox.Show(ex.Message, … | |
Hi, I just want to make sure that I completely understand the term "Fake Signatures". Is a "Fake Signature" where at the bottom of your post's body text you add your name and maybe a link instead of having it automatically placed there by your profile? Or are you saying … | |
Re: Which part are you having problems with the login or the form where the person can post information or is it the pulling the information out of the database and displaying it for someone to see? What you actually want to do is extremely simple. I personally learned to do … | |
Name: Jason Nickname: JR Height: 5'10" Weight: 210 lbs. Hair: Blond Eyes: Hazel Location: Germany Age: 35 Hobbies: Medieval History, Programming Relationship Status: Married w/ Children |
The End.