borfast
Members-
Posts
3,271 -
Joined
-
Last visited
Everything posted by borfast
-
That's odd... I think it should work. Try using a relative path to the file instead - instead of using ErrorDocument 404 /home/xxxxx/public_html/404.php use just ErrorDocument 404 404.php
-
Hi Dave. First of all, congratulations for having the courage to embark on such an adventure (tableless layouts)! I'm not sure I understood your problem. You want the outer box to grow depending on the inner box's contents? Meaning, you want the outer box to grow according to the inner box size, is that it?
-
My favorite used to be (before dropping Windows) WinRAR, no doubt about it. It's well worth it's price. I don't know Total Commander but it seems good, from what turtle says (sorry Don, I just had to use your "real name" once again ).
-
dieguy, ask them how are they accessing your website. Are they using 'www.******' or just '******'? I remember having a similar problem some time ago with phpBB and the problem had somthing to do with the cookie domain.
-
How To Create A Mysql Database Without Cpanel?
borfast replied to lardieb's topic in CPanel and Site Maintenance
Hi lardieb. Unfortunately that is not possible. The only way to create new databases or users is through CPanel's MySQL manager. It's a matter of security. -
It's not that complicated, really! The PHP code is probably the easiest part, as you don't even need to know what it does (though it would be good if you did). The part that may be difficult for you to understand is the one about creating the database and the table. After that, you only need to copy/paste the lyrics into the database. If you need any help, you know where to reach me
-
Hello Ty! From the template you posted, seems quite easy to get the lyrics from a database! The hard part would probably be to set up the whole stuff - transforming all those 21000 pages into.... ONE! Here's a piece of code to start: ><html> <head> <title>Dream On</title> <link rel=stylesheet href="/css/songpagestyles.css" type="text/css"> </head> <body> <!--#include virtual="/includes/songheader.html"--> <!--#include virtual="/includes/texttoggle.html"--> <table width=750 align=center border="0" cellpadding="5" cellspacing="1"> <tr valign=top align=center> <td align=left> <pre><h1><div id="lyr"> <!-------PASTE SONG LYRICS AND ALL INFO BETWEEN THESE TWO LINES---> <?php //******************************* // Get the lyrics from the database and print them to the HTML page //******************************* $db = mysql_connect(localhost, "dbusername", "dbpassword") or die ("Unable to connect to database."); mysql_select_db(<dbname>, $db) or die ("Unable to select database."); $id = $_GET['id']; // Gets the value of the 'id' variable passed in the URL $query = "SELECT * FROM lyrics WHERE id='$id'"; $result = mysql_query($query, $db) or die("Error executing query: " . mysql_error()); $row = mysql_fetch_array($result); echo nl2br(htmlentities($row['lyrics'])); ?> <!-------PASTE SONG LYRICS AND ALL INFO BETWEEN THESE TWO LINES---> </div></h1></pre> </td> <td align=right><!--#include virtual="/includes/google_ads.html"--></td> </tr> <tr valign=top align=center> <td colspan=2><hr></td> </tr> </table> </body> </html> That piece of code that replaced the actual lyrics is the PHP code that will fetch the lyrics from the database and write it up on the page. Now comes the hard part: you'll have to create a database (if you don't have one already - use CPanel for this) and inside that database you'll have to create a table (use phpMyAdmin) - I called it 'lyrics' on the SQL query but you can chage it's name as long as you adjust the $query statement. The table structure could be as simple as having a column named 'id', which would uniquely identify those lyrics and another column named 'lyrics', which will hold the actual lyrics' text. The first column (id) would be of type INTEGER and with the special 'flag' AUTO_INCREMENT set to true. The second one could be set to TEXT or MEDIUMTEXT - the difference is that the first one holds up to 65535 characters and the second can store up to 16777215; I'd say TEXT is enough but you'll know that better than me. And now, the real tough part: insert all the lyrics into the database! This can be done using phpMyAdmin, too. When doing this, leave the 'id' field blank (it will be incremented automatically). After having done all this, the lyrics can be fetched from the database by getting the URL in the form http://yoursite.com/lyrics.php?id=X where X is the database id of the lyrics you want to fetch. Well, this is a pretty good start. Try implementing this first with just a few lyrics inserted into the database and then, if you want to keep going, I'll help you with implementing the rest - getting the list of all the lyrics from the database, etc
-
Great program! Used it for years when I still had Windows. It's much better than the over-bloated and super-famous ACDSee (which I hate ).
-
I'm with Tracy, here. A Google search is probably the best place to start. You may also want to turn off the Help and Support service from starting automatically. I can't remember exactly how to do this but if I'm not mistaken, you can right-click "My Computer", select "Manage" and you'll have access to the system's services configuration. Change the Help and Support service start mode from automatic to manual. This way it will not eat up 18 Mb of memory (probably not that much but I remember it consumes *a lot*) every time you start the computer but it will still be accessible. The only difference is that it will take a little longer to start the first time.
-
Lunar Magic, if you want to do it yourself, it's quite easy. The image is not actually an icon (.ico), you just create a PNG, GIF or JPG and change it's file extension to .ico A quick Google search provided this link which seems to be good: www.basictips.com/tips/article_95.shtml Hope this helps
-
Thomas, RSS stands for RDF Site Summary, if I recall correctly. It's purpose is to provide a way for other sites to fetch news headlines and such stuff from your site and place them on their site. This is achieved by using a standard "language". A search for RSS on Google gives you plenty of stuff to read
-
Oh, one more thing: don't use just $Page to get the variable passed in the URL. If 'register_globals' is turned off, your script will fail. Instead, use $_GET['Page']. You should always use $_GET['variable_name'] for variables passed in the URL, $_POST['variable_name'] for variables sent through an HTML form, $_COOKIES['cookie_name'] for cookies, etc... because this way you know your script will always work, whether register_globals is on or off.
-
Deno, I forgot about one thing: be carefull when using such a method for including pages. Someone might try to retrieve files they shouldn't be able to access simply by putting the filename in the URL. Use a numbering method instead. like index.php?page=x, where x is a number and then, on index.php you'd have: >switch($_GET['page']) { case 1: include "page1.php"; break; case 2: include "page2.php" break; ... default: // Do nothing or include a default page here } Hope this helps
-
Perhaps you can include the whole file? It's the simplest trick of all, just place this: include("page"); where you want the script to "print" the file and it will be there. If you want it to print the page on another location, that's a different story.
-
I don't know if that's the problem but the only thing wront I see in the code is the ']' at the end of $DBName. I tried it on my computer and that's the only error I got.
-
Hello again, Deno Could you please copy and paste the code up to (and including) line 38 so I can see where the problem is? Oh, and please indicate which one is 38. Thanks
-
Hi Ty. As I suspected, my previous post didn't help much... Well, that's a strange behavior indeed. If you right click the frame and then select "Reload this frame" (or something equivalent) then it should reload that frame only, not the entire frameset. I might try and install the darn thing (NN 7.1) on my computer to try it out. Can you provide an example (an URL) of where this happens? Or does it happen in any page that uses frames? About the tables, perhaps the text is being centered because the table inherits the text alignment from the table's parent element? Make sure you don't have the table inside another element that centers the text. Again, an example would be good, so I could take a look at the code.
-
Jessica Rabbit, Tinkerbell, Daphne, Batman, Bubbles from PowerPuff Girls... Seriously, this could benefit from a poll. It would be a neat voting
-
Hello Ty That's actually how many browsers (all of them?) behave when viewing a page with frames. Here's what happens behind the courtains: A page with, say, two frames, is composed of three files. The base file (let's call it index.html) is where the two frames' files (frame1.html and frame2.html) are inserted. When you browse a page with frames, the URL you feed your browser is the URL of the index.html file. This file has "instructions" in it that tell the browser to load frame1.html and frame2.html. The browser will then "dig two holes" on index.html and place each file in a hole. Each of these two files is just a regular HTML file and any link contained in it will replace the file in the respective hole, just like when you click a link on a regular page and it replaces the whole page. Everything's fine until here but when you hit the "Reload" button, the browser fetches the index.html file once again and it doesn't care about what files were loaded into the holes. It will read index.html again and once more index.html will "instruct" the browser to load frame1.html and frame2.html. There. Now that I've written all this, I've read your post again and I noticed that you didn't specifically say that this was the problem. I just assumed it was. So there's a chance that this won't help you at all and I've just wasted the minutes it took me to write all this... Oh, about the tables, I've never used any Netscape version above 4.x but 6.x and 7.x are based on Mozilla and I've been using Mozilla since before 1.0 and never had any problems with tables. What's wrong? Perhaps it's something in the HTML code. Let me know where you're having problems and I'll take a look.
-
Oh! So the problem is not quite with the functions but with their arguments! Well, the first function reporting an invalid argument (mysql_db_query()) says the "supplied argument is not a valid MySQL-Link resource", which means in fact that the problem is on the database connection - my apologies to whoever mentioned this on the help desk, seems you were right. I have never used the mysql_db_query() function, I always use mysql_query(), which doesn't need a MySQL-Link resource at all. Actually, now that I went to php.net looking for the documentation for mysql_db_query(), here's what they have to say about it: So just use it like I do (new code in green): Try it like this and let us know if it works PS - Notice the use of the mysql_error() function. It's really usefull when debugging PHP scripts that work with MySQL
-
No offense meant, and I may also be wrong but... I don't think your friend knows much about webpage construction or webservers, does he? First of all, XHTML has absolutely nothing to do with the type of server your website is hosted on. It only has to do with the browser people use to see it. If what your friend described actually happened, then I'd advise him to fire the responsible for his website... The only thing that might occur if you use XHTML is that some older browsers may have problems with it. Still, most (if not all) browsers used these days fully support XHTML, so this shouldn't be a problem at all. So, to put it in a simple way: there's no problem whatsoever in using XHTML to make your website and if you use it, the webserver has got nothing to do with possible speed (or other type of) issues that may arrise on a browser that's 10 years old Actually, you should use XHTML. Here's why. Hope this helps
-
I completely agree with Alan
-
Hi Wayne I migrated two phpBB2 foruns to Invision Power Board not very long ago and it was quite easy. I don't think I lost anything along the way but if you want to be sure, just try using Invision's converter on your home set up. It doesn't touch the phpBB2 tables so you'll be safe and you'll be able to see if it'w what you need.
-
I noticed those, too, Andy. But I don't think that's the source of the problem because if it was, then PHP wouldn't say that mysql_*() is an undefined function. It would say the script contained a parse error on line X. I'd say the " after the USERNAME is there in the original script but Deno inadvertently deleted it when changing the info to post the code. Not sure about the } being commented out but that wouldn't result in mysql_*() being reported as invalid functions either. Deno is reading these posts right now, so let's wait and see what he has to say
-
Welcome aboard the team, Dick!
