s0c0
Members-
Posts
422 -
Joined
-
Last visited
Never
Everything posted by s0c0
-
My vote is it looks better with white. Why don't you create two sites for us, a black.html and a white.html, then post the links. That will make it easier.
-
Ideas?
-
Cool, all things I will work on. Thanks.
-
This is only the second idea I've come up with for the site. I'm no pro, but I can most likely implement any good suggestions. Might be kind of slow since your going over my cable connection to get to this: http://71.195.254.171/sample.html The application side is in pre-beta and I'm only letting friends and co-workers find all the bugs for right now. Thanks.
-
My app requires that the browser not cache the page. This is because each time the user clicks a specific link an xml file is generated which contains some file links and metadata read by a flash application. But the browser is caching the page and it's caching the flash app or something like that. When the user re-generates the xml the content within the flash app is not refreshed. Instead the user must manually clear browser cache. Here is what I have implemented in an attempt to solve the problem: /* prevent browser cache */ header( "Expires: Mon, 20 Dec 1998 01:00:00 GMT" ); header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" ); header( "Cache-Control: no-cache, must-revalidate" ); header( "Pragma: no-cache" ); I've tried a number of variations with this, but it is still caching whats in the flash player. The html tables are redrawn with fresh mysql table content, but thats it. Was I clear? I hope so! I'd like to get this solved. Thanks for reading. I have full access to the system so if there is an apache2 directive or php5.ini parameter just let me know.
-
Overall layout is okay and the site looks fairly clean though I'm not a big fan of orange on websites. The area where all your text is needs some work, it just doesn't look professional, and like others have said, the font type needs to be changed. At least it's not this: http://unisys.com/index.htm That site gets my ugliest site of the day award!
-
Here is what I like: Header image. The overall layout. What I don't like: The navbar, something is just off with it. I think it's the white vertical lines. I'm not a big fan of the off-yellowish color for you're tables either. It's okay, but mayble play around with other colors. Maybe even look into a rounded corner.
-
[SOLVED] php code that I can use change the page?
s0c0 replied to bobleny's topic in PHP Coding Help
No thank you, that's the first time I've been able to help some on here. Now I don't feel like such a mooch. -
[SOLVED] php code that I can use change the page?
s0c0 replied to bobleny's topic in PHP Coding Help
There is a header function that acts as a redirect. Try this: header("location:http://website.com"); If the syntax is wrong just google that function. -
Here is code from my login form you can use. The first is for a page called login.php. <html> <head> <title>Login</title> </head> <body> <form method="post" action="auth.php"> <table> <tr> <td>Username</td><td><input name="username" type="text"></td></tr> <tr> <td>Password</td><td><input type="password" names="password"></td></tr> <tr> <td> </td> <td><input type="Submit" value="Login" /></td></tr> </table> </form> </body> </html> That form posts to a page called auth.php: <?php session_start(); $username = $_POST['username']; $password = $_POST['password']; $con = mysqli_connect('localhost', 'user', 'password', 'db'); /* connect to database */ if (!$con){ die('Could not connect: ' . mysql_error()); /* report connection error on failure */ } $con->select_db("music"); /* select database */ $auth_query = "Select user_id FROM users WHERE username='". $username. "' and password='" .$password. "'"; /* auth query to ivault.users */ $auth = mysqli_query($con, $auth_query); $row = mysqli_fetch_row($auth); $count = $row[0]; if ($row > 0){ /* login success */ $_SESSION["user"] = $username; /* store username in session */ $_SESSION["uid"] = $count; echo $_SESSION["user"]."<br/>"; header("Location: http://192.168.1.134/mymusic.php"); /* browser redirect */ } else { /* Login failure */ echo "We're sorry ". $username ." but we were unable to log you in using password ". $password .". Please try again</p>"; echo "<a href=\"http://192.168.1.134/login.php\">Retry login</a>"; } mysqli_close($con); /* close connection */ exit; ?> <html> <head> <title></title> </head> </html> This code is from a backup I made a few weeks ago, but the login has been working for a while so it should be good. You can remove the stuff about sessions in there unless you want that in there.
-
Want do you mean by ID? Where is this ID you speak of? Is it a primary key in a mysql table? Anyways a quick google yeilds plenty of plausible solutions. Here are just a few: http://www.phpeasystep.com/workshopview.php?id=18 http://www.phpfreaks.com/quickcode/Rename-Files/549.php or better yet try php.net and you will find the rename() function: http://us2.php.net/manual/en/function.rename.php
-
I can't tell you how to solve your specific problem, but I can give you a best practice. Best practice for storing large files such as images and audio in a database is don't do it. Instead store a link to the file in the database. Experienced database admins will tell you this and most experienced and inexperienced people (like myself) on this forum will tell you this.
-
In your mysql insert statement you'll want to take the image name $_POST['image'] and do something like this: I am not on a lamp box right now so I can't verify the above code, but something very similiar to that should work. I am developing an application with this feature in it and that code works. If you want a better example I can post my code when I get home.
-
You should use javascript for form validation, no server load that way.
-
My php app allows users to store files on my server. Each user has their own directory on apache where the files go. Currently I have this directive: Options MultiViews -Indexes SymLinksIfOwnerMatch IncludesNoExec Which gives the user a forbidden error if they were to try to navigate to www.example.com/user/ted. Is this the best way to do this or should I be doing this a more elegant way? While this is ok security I guess a program could be written that brute forced http requests like www.example.com/user/ted/file.zip ... file2.zip ... file3.zip etc and eventually it could download a file. So what are best practices on making this more secure? Anyways I'd appreciate your thoughts on this matter.
-
funk it. I'll learn to live with it.
-
I solved this on my own. Go to the id3 project page [ http://getid3.sourceforge.net/ ] and download the latest stable version. I downloaded version 1.7.7. Then extract the files contents to your web servers root folder. The readme contains the rest of the information . I was able to pick up the syntax quickly by analyzing the PHP scripts in the demo directory. Here's an example piece of code:
-
Your wrote this book, didn't you?
-
I'm not sure that this is going to work (this isn't for personal use this is a project/webapp) and furthermore I'm not sure on how to use classes. I'm sure it's in my php book and I'll research using classes tonight. If anyone else has ideas please do tell.
-
Newegg for instance uses a cookie to store shopping cart information. Maybe go to newegg.com, add something to a cart then go to the folder your cookies are stored in C:\Documents and Settings\%username%\Cookies and see how they do. If it works for them it should work for you.
-
I would like an easy way of reading(writing is a plus) id3 tags. I have googled this and there is no easy way. PHP.Net has the following site http://us3.php.net/manual/en/ref.id3.php and I see that I have to install PEAR which I have and then install a pecl extension. I'm not very good with compiling and was wondering if anyone new of a suse yast repository that contains these or at least an RPM? Or perhaps another way of getting id3 tags?
-
Can you make them create a simple login (maybe just email/pass) and use that to save shopping cart info in a cookie? That at least avoids the IP problem, but introduces other unrelated potential problems.