217 Posted Topics
Re: Varuna1, I think my screen-scraping PHP class (class_http.php) may help you. Check it out at: [url]http://www.troywolf.com/articles/php/class_http/[/url] At first glance, you may think "screen-scraping" is not what you need, but if you look closely at my class, you'll see it supports POSTING form variables to the remote page. With my PHP … | |
Re: When I first read your title, I assumed you wanted to know if it's faster to load images from the file system or the database, but this is not your question at all. Well, I can't say I know for sure, but I'm comfortabe saying in your example of say … | |
Re: Actually, you can effectively end a session using: [PHP]session_unset(); session_destroy();[/PHP] Alternatively, you may find my PHP session class helpful. [url="http://www.troywolf.com/articles/php/class_session/"]http://www.troywolf.com/articles/php/class_session/[/url] NOTE: my session class does not use PHP's built-in sessions. The class comes with methods and code examples to do login and logout. The purpose of my class is to … | |
Re: [QUOTE=bwest]Well after doing more research. (Actually I did a view source on this page) to see how daniweb does it and they just replace the hard return characters with <br> tags. Thanks anyways[/QUOTE] Exactly the solution I use, bwest. [PHP]$mystr = str_replace("\n","<br />",$mystr);[/PHP] | |
Re: Check out my class_xml.php. It should make this job easy for you. [url]http://www.troywolf.com/articles/php/class_xml/[/url] :) | |
Re: Browser security will not allow you to run scripts against pages not from your own webserver, but Danceinstructor is right, you could do this server-side. It's more work, of course, but server-side is the way to accomplish your goal. Check out PHP's curl support, or better yet, my class_http.php makes … | |
Re: mystique, here is the nitty-gritty. Since the pages are not just HTML, that is, they are PHP that outputs HTML, the only way for you to get the source files is ftp. If they were simple HTML pages, you could just view source in your browser and save them. I … | |
Re: I haven't personally experienced any AOL biases here at Daniweb, but I probably would not in the forums I spend time in. I think a lot of professional geeks "hate" AOL because in the early days and continueing for many years, AOL did not support a lot of Internet standards. … | |
Re: [b]ATTENTION ALL NEWBIES![/b] [b]"supplied argument is not a valid MySQL resource"[/b] is almost always the result of an invalid SQL statement being passed to the database. When you are using a scripting language to dynamically build a SQL statement, it is VERY easy to introduce problems into your SQL string. … | |
Re: You are in luck! Just Monday, I wrote a step-by-step HOWTO for setting up a WAMP system. That is Windows, Apache, MySql, and PHP. I include instructions to setup phpMyAdmin for managing your database. The tutorial is specific to Windows XP Home and Pro. It is in this Daniweb thread: … | |
Re: It's probably safe to say it's not some off-the-shelf script or app. Anything like that would be a custom developed app. It appears they script their site using PERL CGI. | |
Re: I don't have a simple fix answer for you, but.....it may help you to understand that errors and warnings that are output to your browser are indeed "browser output". There are a few things in PHP that you can only do BEFORE anything is output to the browser. For example, … | |
Re: I appreciate senexom's inbiased assessment. Posts such as "ASP Sucks!" or "PHP RULES!" just don't help anybody! :) I have been a professional web/database developer for 10 years. I started out doing CGI using a language called PL/B. I quickly moved to ASP/VBScript and SQL Server. This is where the … | |
Re: Well, if you have a string, and you want to replace parts of that string with another string, maybe you should search for a PHP command to replace strings. [url="http://www.php.net/manual/en/function.str-replace.php"][b]str_replace()[/b][/url] ![]() | |
Re: ashneet, it sounds like you are asking for a tool that will let people type in web content and format that content without using HTML as you type in the content. You want to be abe to see the formatting as you type. This is called WYSIWYG. What You See … | |
Re: Are the vowels missing on your keyboard? No, it seems your code snippet contains vowels. Is that txt msg speak? I guess I'm too old (at 33) to interpret. I definitely have no idea what "sth" means. | |
Re: You do not set or unset the built in $_POST, $_GET. They only exist for the life of the script. They do not persist between server hits. | |
Re: Um....Kennedy_f, what are you talking about? It seems like you are replying to a SQL Server related thread, but your post is a new thread in the MySQL forum! :eek: What's up? | |
Re: [QUOTE]Warning: session_start(): open(/tmp/sess_390089ed4b86819ce69a881e681f4334, O_RDWR) failed: Read-only file system (30) in /hsphere/local/home/lwilliam/lawfour.com/database/Demoadd.php on line 1[/QUOTE] I do not think there is any ambiguity in the error message above. Seems clear the problem is your host has tmp dir for your account set to /tmp/, and that the dir is not allowing … | |
Re: phpBB's installation specifically prompts you to enter a table prefix. You say you don't have that option with your host because they give you some single-click install or something? I don't know how to tell you to get around that. If you wanted to manually change the table prefix for … | |
Re: The "problem" is of course that your browser "understands" certain file types, so if you navigate to an image file such as .gif, .jpg, .png, it will display the image because it knows how to do that. Likewise, if you have PDF extensions installed, when you navigate to a PDF … | |
Re: You could use a subquery, but subqueries are not supported in MySQL until 4.1. Many hosting companes are running 3.2, 3.3, or 3.4. What version of MySQL do you have? (PHP's phpinfo() command will tell you--if you use PHP.) To use a subquery to solve your issue, do this: [CODE] … | |
Re: Your question is constructed in way making it difficult to read, but I have 1 thing for you. "table" is a [url="http://dev.mysql.com/doc/mysql/en/reserved-words.html"]reserved word in MySQL[/url]. You should not name a colulmn "table". You [i]can[/i] use reserved words, but in your queries, you'll have to put brackets around the reserved word … | |
Re: I already "met" you in our PHP forum here on Daniweb. You are brand new here, but already you've been helpful with your thorough, accurate, and clearly written posts that include good code examples. So let me extend a big WELCOME to you, Sp!ke! We've got a great community here … ![]() | |
Re: I was hoping someone with more specific experience would reply, but so far no takers. Well....I am very experienced with both MSSQL and MySQL. ANSI standard SQL is the same on all RDBMS. However, most database systems have their own extension functions. For example, a common T-SQL (Microsoft's Transact-SQL) function … | |
Re: Man, I love Sp!ke's posts. He posts beautiful PHP code with excellent comments. Message to all--don't forget to use the post rating system to thank people who help you. Ashneet, I think what you want is simply an array of arrays. PHP does not support true multi-dimensional arrays, but an … | |
Re: Sp!ke is correct. But of course you could always manually create your own table of table names. It would not be dynamic, but if you don't mind maintaining it for use in your admin app, it would work. | |
Re: Are you wanting a counter to tell you how many times the form has been submitted? You have some options. One thing you could do is simply use your website stats to see how many times your submission or thankyou page has been loaded. This requires that you submit your … | |
Re: PHP's [b][url="http://www.php.net/manual/en/control-structures.switch.php"]switch/case[/url][/b] statement is like a big [b][url="http://www.php.net/manual/en/control-structures.elseif.php"]if/elseif/else[/url][/b] statement. I use it all the time. I think the PHP documentation explains it well--not sure I can make it more clear. [url="http://www.php.net/manual/en/control-structures.switch.php"]http://www.php.net/manual/en/control-structures.switch.php[/url] You don't have to use switch/case--you can use if/elseif/else instead, but switch/case is cleaner. Also, switch/case allows you to … | |
Re: Sp!ke offers a nice solution to help prevent people from multiple posting. Thanks, Sp!ke! :) Jdmml, do you want to restrict public access to your form altogehter? If so, then you must password-protect the script or the entire directory. You can employ security at the web-server level, but how you … | |
Re: You will need a server-side solution. For most people this means ASP, ASP.NET, PHP, or JSP, although other options exist. Technically, you can code server-side ASP using Javascript, but most people don't. Most people use JavaScript for client-side scripting. You solution needs to be server-side because you need something that … | |
Re: PLEASE read my post in this thread: [url]http://www.daniweb.com/techtalkforums/thread28357-attention+newbies.html[/url] | |
Re: Your problems are beyond the typical. They are quite specific to your configuration--this makes it difficult to help you. I've never heard of WMServer Tools, but I just looked it up--still not sure what it is, but it does not sound like it includes MySQL. Instead, it seems like a … | |
Re: [QUOTE=sytodave88]i am looking for a php script that give a user a certin amount of money when they sign up (dummy money) its for an rpg game online similer to [url="http://www.themafianetwork.net"]www.themafianetwork.net[/url] and a script that bans users and mod kills them if someone could help it would be very helpfull[/QUOTE] … | |
Re: In a quick glance at your code, it does not appear that your are outputting anything before you attempt the header() function. So, my guess is either: 1. connection.php is outputting something using echo(), print(), etc. 2. You have whitespace before or after the initial and final <?PHP ?> tags … | |
Re: Do not worry about the second error. The first error is causing the second. Fix the first, and the second goes away. "[color=DarkRed]Warning: Supplied argument is not a valid MySQL result[/color]" is exactly that--an invalid MySQL result. This is usually because the query you executed was invalid. So find the … | |
Re: I imagine it should be possible to develop a Java applet or an ActiveX component that hooks into TWAIN libraries. This would require the client computer to accept, download, and successfully install your custom-developed object. If you can choose between Java and ActiveX, I recommend Java because it can be … | |
![]() | Re: If you'll head over to [url="http://www.troywolf.com/articles"]http://www.troywolf.com/articles[/url], you can check out my PHP Session class. It includes a method to do login for password-protecting pages and an example login.php. In order to customize the example for your own use, you'll need to study the system to understand how it works. Once … |
Re: I didn't study this long, but I'm pretty sure your issue is this line: [php] $loggered = mysql_num_rows($oogaboooga) or die(mysql_error()) [/php] You see, if $loggered is zero, your die() will happen, but since there isn't actually a mysql error, you'll see nothing. Just remove the die() part--you don't need it … | |
Re: Try this: [php] if (! @mysql_connect($server, $database_username, $database_password)) { $error = "There was error when attempting to connect to the specified database server: ".mysql_error(); } [/php] | |
![]() | Re: It is easier for me to simply post a good, working code example rather than debug yours, so here is a simple example of how to connect and query data from a MySQL database using PHP. [PHP] <?php $db_server = "localhost"; $db_user = "root"; //Change if your username is not … |
Re: phalen, you asked if there was a solution using either HTML, CSS, or PHP. In HTML, you simply just insert <BR /> after each letter. For example, if you had a table header containing the text "Average Length": [HTML] <th> A<br />v<br />e<br />r<br />a<br />g<br />e <br /><br /> … | |
Re: Try something like this: [PHP] if (!$res = mysql_query($sql)) { echo mysql_error(); exit(); } if (mysql_num_rows($res) > 0) { while ($row = mysql_fetch_array($res, MYSQL_ASSOC)) { echo "<br />".$row['zipcode']; } } else { echo "No data."; } [/PHP] | |
Re: I have written what I think is a good step-by-step HOWTO for newbies to setup a WAMP system. Windows, Apache, MySQL, PHP. It includes enough information to download, install, configure, and test the various pieces including 2 test PHP scripts. It is on my website at [url]http://www.troywolf.com/articles[/url] | |
Re: Unfortunately, I don't have the experience or time to troubleshoot your exact problem, but I can offer you my WAMP Tutorial which sets up Apache2, PHP5, and MySQL4.1 on Windows XP Home and Pro. It is here: [url]http://www.daniweb.com/techtalkforums/thread26579.html[/url] | |
Re: I've not done what you envision, but sure. It's not far-fetched. How seperated do you want? If you want complete seperation of the 4 areas, then you might as well have 4 installations. So I'm assuming you want SOME integration between the 4. What are your ideas? I've not used … | |
Re: POST vars are more secure because they are not visible in the URL. Also, if you are posting large amounts of text, GET method is not going to work well. I generally only use GET (querystring) method for pages such as a product detail page. I might do something like … ![]() | |
Re: Check out HTML's BASE element. [url]http://www.w3schools.com/tags/tag_base.asp[/url]. You'll still have to add it to every page, but it's one line in your <HEAD> -- you do not have to modify every link and image. | |
Re: Try this: [CODE] function doCheck(str1,str2) { top.LocalCacheLoadStatus = false; parent.SearchFrame.location.href=str1; g_str_Mode = str2; alert (g_str_Mode); var url = str1+".jsp?str2="+str2; alert(url); document.location = url; } [/CODE] If you need to pass the variable to the jsp page, and you don't need your user to ever see the output from that jsp … | |
Re: I would think you would have done the same thing, but I started by going to [url="http://www.mysql.org"]www.mysql.org[/url]. I clicked downloads, scolled down to the full Windows Installer...ended up at this mirrors page. [url="http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-4.1.12a-win32.zip/from/pick#mirrors"]http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-4.1.12a-win32.zip/from/pick#mirrors[/url] I selected the top in the list for me--which was FTP from a Chicago, IL server. Downloaded … |
The End.