sKunKbad
Members-
Posts
1,832 -
Joined
-
Last visited
-
Days Won
3
Everything posted by sKunKbad
-
parsing xml with 4 is too hard. i'll have to let somebody else tell you how to do it. even with all the tutorials I could find I couldn't do it well. php5 is a breeze with its simplexml.
-
what version of php are you running?
-
what kind of server is the server outside of the campus? if it is a linux server, and running appache, you can easily password protect the folder or files with .htaccess and .htpassword files. There are many tutorials online how to do this.
-
[SOLVED] Help with dynamic CSS - Changing font size
sKunKbad replied to dlcmpls's topic in PHP Coding Help
If you want to have the font change immediately before refreshing, you will need to use javascript to apply the fontsize to the body of the page. I have only limited experience with javascript, but you will need an onclick event. The cookie will have the fontsize for the following pages. -
Hey Frost, is this bad: <?php if (isset($_GET['tip'])){ $tippage = $_GET['tip']; $currenttipcat = $_GET['cat']; include('C:\wamp\www\site\root\tipstext\\' . $currenttipcat .'\\'. $tippage . '.php'); } ?> Can it be made safe if it is? I'm working on a script that I just started last night. If it can't be made safe then I will have to do something else.
-
Because they are. Everything is a file in linux . and .. are no exception. . is a link pointing to the current directory, while .. is a link pointing to the current directories parent. You can simply avoid them within output by using an if(). eg; <?php $d = scandir('foo'); foreach($d as $f) { if ($f != '.' || $f != '..') { echo $f; } } ?> In order for that to work, I had to replace the || with &&. Thanks for your help.
-
Thanks Thorpe, Why is it that with dir or scandir they always have the "." and the ".." listed as files?
-
I'm looking for a function that puts the contents of a folder (the file names) into an array. Is there such a beast? For instance, if there is a folder off of my root called /tips/, and I want to list the files that are in it, such as tip1.txt, tip2.txt, etc.
-
PHPMyAdmin is a simple interface for you to do stuff within MySQL. It isn't MySQL, it just helps you create databases, look into your databases, and modify them. Try installing WAMP5. It is a complete PHP / Apache / MySQL installation.
-
You really don't need PHP until you have a need for server side scripting. I build my sites using standard XHTML type coding, then if I need to incorporate some PHP, I simply insert it.
-
There might be session info in the book_sc_fns.php include. Do you see any? Make your own php.ini file. Put it in your root directory, and then add session.use_trans_sid=0 to it, and see for yourself if your cart works. You gotta love a host that tells you what to do. It's your business if you screw up your site not theirs, sheesh.
-
I've read a few php books, and the one I am reading now is really good. It really helps you understand some of the core functionality of php. It's called "programming php" and its partially written by the dude that invented php. It's definately worth the money. Programming PHP on Amazon.com
-
you should search for slimbox.js or lightbox.js. These are free javascript codes for image galleries.
-
The Session ID will pop up in the URL if session.use_trans_sid=1 in your php.ini file. This happens when the user's browser has cookies either disabled or restricted. Try putting session.use_trans_sid=0 in your php.ini file. Post your chunk of script from session_start(); on up and let me see if there might be something else.
-
Check out this tutorial about curl. It may help you. http://www.phpit.net/article/using-curl-php/2/?pdf=yes
-
session_set_cookie_params(300);
-
[SOLVED] Do Sessions require Cookies be turned on?
sKunKbad replied to hanlonj's topic in PHP Coding Help
In the case of a session, the cookie only holds an identification number, and when the user who has the cookie accesses the pages that are in the session, their browser identifies itself to the server as holding the session cookie. When the server then sends the page to the user, it uses data that was stored in the $_SESSION array. The beauty of using sessions is that an array value may be stored, and even if the back button is pressed on the browser, the array value is still the same. For this reason a shopping cart is usually set up with a session. The cart itself normally contains items, and when items are added or deleted from the cart, the $_SESSION array is updated. If a user then hits the back button, or browses the site and comes back, the shopping cart is still "alive" and holds the items that are still supposed to be there. I hope this makes sense. There are other reasons for using sessions, and perhaps others might add some knowledge here. -
[SOLVED] Do Sessions require Cookies be turned on?
sKunKbad replied to hanlonj's topic in PHP Coding Help
if you use session.use_trans_sid=1 in your php.ini file you don't need cookies to be turned on. I do this in case somebody has cookies turned off. -
I use a session with a cookie to track a shopping cart on my site. The session holds cart item info so that a customer can add and delete items and the shopping cart stays right even if they use the back button on their browser
-
try if(!isset($street)) instead
-
You might consider keeping your admin pages above root, and include them if the admin credentials are supplied. If you are on a linux server, using htaccess/htpassword will be sufficient. If that isn't good enough, you would have to go with an encrypted connection.
-
you can do either
-
your opening bracket is on 166, and a closing bracket is not found until 222 which is inside the default case. I gotta go, hope you figure it out!
-
does perhaps closing the while loop on 165 make a difference? You have no closing braket }
-
line 174 has ;;