-
Posts
591 -
Joined
-
Last visited
Everything posted by btrfld
-
There is a syntax error: $userName = $_POST['userName'] should have a semicolon after it. Maybe that's causing it to fail?
-
I don't know about the book (which book is it, by the way?), but I can tell you this from my experience: Inside double quotes (") variables are evaluated. So if you had a script <?php $userName = "Fred"; print "Hello $userName"; ?> the resulting output would be Hello Fred. However. The evaluation of variables inside quotes seems to stop at simple (or scalar) variables. It won't evaluate $_POST['userName'], for instance. That's why taking the quotes away made it work. The script would work if it said <?php $userName = $_POST['userName']; print "Hello $userName"; ?> Does that help?
-
Your script doesn't show how $userName is being set. Can you tell us more?
-
Frankly, it would be OK with me if I never get to experience the new Help Desk goodies first hand. And who knows? It may happen. This is TCH after all.
-
Hi Daniel. In addition to the DIV centering its text, you need to apply a little css to the TABLE itself. Try this: <div class="center"> <table id="centered"> <tr><td></td></tr> </table> </div> .center { text-align: center; } #centered { margin: 0 auto; } Very brave of you to go straight for XHTML Strict. Good for you, and good luck.
-
Hi Andy. The problem is the extra opening tag in the print statement: change print "<h3>Hi there,<? $userName! </h3>"; to print "<h3>Hi there, $userName! </h3>"; and it works fine. Good start. Keep it up, and have fun. PHP is great!
-
Is It Possible To Diagnose A Site's Error Messages
btrfld replied to rnmcd's topic in Open Discussion
I've generally found IE's error messages too cryptic to be worth much. If you have or can get Firefox, it has somethng called the Javascript Console. Look in the Tools menu at the top. It will give you much more useful information about the error, including what's wrong and what file it's in. -
Then I don't have to bother the Help Desk. They probably have plenty to do. Thanks, Bill.
-
Thanks, Lisa. I will.
-
Hi all. I use the secure address to access my cPanel (https://domain.com:2083). Since we're on shared servers I'm used to the warning that the server certificate and the domain name don't match. Now, for the last few weeks I've been getting an additional warning that the server's certificate expired back in the middle of January. Image of the warning attached. Is this something I should be submitting a Help Desk ticket for? Thanks for looking.
-
Hi there. I'm not an expert on Photoshop, so I can't help you with that. But: I use ImageWalker (ht*p://www.imagewalker.com/), which does have a batch resizing function. It doesn't seem to have a setting for file size, only for image size, but maybe you can make it work for you.
-
Hi Dave. I recently had occasion to look for such a script. Check out this article on SitePoint: ht*p://www.sitepoint.com/article/users-php-sessions-mysql It's a basic but complete user management script that I think you could adapt to your purposes.
-
How do you practice for that?
-
Great going, Bruce!
-
Congratulations to you both. Well done and well deserved. TCH has been a great place for the two years I've been a customer. I've enjoyed watching it grow, and seeing both of you grow into the jobs you've had. I know we're in good hands.
-
Well, it seems you've been coding in the middle of the night for a few days now. Sleep, maybe?
-
There is a way to create dropdown menus using almost no javascript. It uses nested unordered lists and css. The only javascript it requires is a function to kick IE in the butt. You can see an example at http://www.wegerarchitects.com/index2.html. There are a bunch of examples of these menus out there. Google 'css menu' and you'll find several. My page was based on one of them; can't exactly remember which one.
-
Microsoft Access Database, Data Access Pages?
btrfld replied to jeolin's topic in CPanel and Site Maintenance
There is an option: you can use Access to access (nyuk nyuk nyuk) a MySQL database on your TCH server. Check out how at http://www.itc.virginia.edu/desktop/web/mysql/msaccess.html. As far as managing the database itself, phpMyAdmin works great and is available through cPanel. - You create the database and user and connect them to each other using the 'MySQL Databases' link. - Then once that is done you can export your Access database in some csv format, and import it into the MySQL database and manage it with phpMyAdmin. Hope that helps. -
Sorry to be a party poop, but I have to weigh in on the Dreamweaver (or not) issue. For my money it's a nice tool for playing around with the look of things when you don't know what you're looking for. However, there are two reasons to avoid it for actual coding: 1) If you look at the source it generates, you'll find it's very large and full of obscure code. By its very nature Dreamweaver is trying to solve all problems for all people without the user having to understand anything. Therefore it has to code everything to handle all possible situations, and the result is a very heavy page causing huge bandwidth usage even for a simple page. 2) Though I think it can do all the fancy things you want it to do, the effort it takes to understand how to use Dreamweaver would be better spent studying and understanding how the html/php/js code itself works. You can write leaner, simpler, faster-loading pages yourself in less time than it will take you to learn how to use Dreamweaver. I think you would be much better off using TopStyle ($) or HTML-Kit (free), both good source editors with code highlighting and fine preview capabilities. OK. End of rant.
-
Hi Nat. I think the centering issue has to do with inheritance. The table containing the text is inside a 'centered' column of a parent table. IE passes down the alignment to the child (incorrectly) and Firefox doesn't. As Dick says, you can style the inner table to correct the problem.
-
I use Opera for testing purposes. It seems to do some things by the standards (like Firefox) and some things not (like IE), so there are times when I make a page that displays perfectly in IE and FF and fails in Opera. Speed-wise it seems to take the usual amount of time to load up. Then it's maybe a little faster loading pages than IE, but not appreciably faster than FF. I think I have to try Maxthon now.
