ober
-
Posts
5,327 -
Joined
-
Last visited
Posts posted by ober
-
-
It may be as simple as using an ORDER BY clause to your SQL statement.
-
That's a little hard to grasp exactly what you're trying to do. Can you post some code? If it's just as simple as displaying HTML along with PHP, you can jump in and out of PHP code as much as you want. And you can store whatever you want to in a PHP variable if that's the problem.
-
[code]
if($_POST['required_field_1'] == "" || $_POST['required_field_2'] == "" || ..... || $_POST['required_field_n'] == ""){
//put your error here
}
[/code]
Should work, but I'd recommend using the trim function around your post variables in case they hit the space bar in the box or something else got screwy.
And it goes at the top of whatever page you do your processing on. Normally you'd submit a form to the same page and if the if statement fails, you display the error message and show the form again. If you're going to go as far as highlighting the ones they missed, you're going to have to set a bunch of flags to change the look of those fields in the form. -
[code]SELECT * FROM tablexyz WHERE date_time_field < '" . date("whatever_format", strtotime("5 minutes ago")) . "' [/code]
-
I'm TOTALLY in Eric... but there's no way I can play in the middle of the afternoon unless I skip out of work.
Is this a ranked server or non-ranked? My handle is "ober0330".... surprise, surprise. I'm so boring.
I'll have to look you up on bf2tracker or bf2s.com
I have about 24000 global points... what do the rest of you have?
-
There are somethings you just have to write yourself or pay for.
-
Oh where to start?
1) 90% of the text is bold. Bold should be used sparingly at best. Reading bold text is annoying and how are you going to make something stand out? Changing the color is nice, but changing bold color just looks tacky.
2) I'm not really keen on your seperator lines. They're too thick and you're really wasting bandwidth if those are images (I assume they are).
3) Get some more action out the nav. The color change is so slight that you barely notice it. Change the background color, swap some borders... do something.
4) Your CSS file has to be one of the biggest CSS files I've EVER seen. With that much detail, you should have a much better looking site. Your main layout CSS file should be less than 4KB. Anything more than that and your HTML is going to show up before your styling... and people on slower connections (or if your server slows down for some reason) are going to see a really horrible looking page until your CSS file arrives. You can split it up and only include certain CSS files on certain pages. I noticed you had a lot of sections for specific content. You should only be including that CSS on the relevant pages!
5) If the logo didn't say it was a scuba site, I never would have guessed that. Get some pictures up there of someone under water. Throw some scuba gear in the background... do something to make me think in my head later that that is the site I want to be at for finding diving locations, etc. Right now it's just a bunch of text and lines. BORING.
6) Get a footer. Right now your main content just hangs there ... close it up with some copyright info or an extra link to the contact info or something about who designed it.
I hope that helps.
-
I'd give it an 8.5. Looks pretty solid to me and the look of it is great.
-
I would, but my ISP blocks port 80 and won't give me a static IP. I know the static IP can be fixed using dynamic DNS, but the blocking of port 80 pretty much kills it.
If you really want to do this, I'd suggest doing some research because there are a lot of security issues to consider. -
That would pretty much remove dynamic sites from the list, or it would make it pretty useless. You'd have to download the sites on a pretty regular basis, and who wants to fire off a 250mb+ download every day??
-
I will change the name of that thread Mark. Thanks for pointing that out.
-
Unfortunately, we don't know either. We can only hope that the admins are working on a way to resolve it. In the mean time, I will express how sorry that we all are about the problems we've been facing.
I've noticed that if you can't post in PHP Help, you can sometimes post in PHP Newbie help. Most of us scan both, so asking in one will probably get the question answered.
-
Now we're getting somewhere :) The main header area does definately need some work. You're heading in the right direction, however.
I'd make a distinction between the footer and everything else, or at least more of an apparent distiction. Your line on the right of the nav just kinda stops at one point and it looks odd. -
Well Hello there.
-
If it's a question of signal, the best solution is to just get a booster antenna for your router. What you're suggesting won't work because the only antenna you have in the laptop is a reciever. You need a transmitter for the B device to pick up the signal from the laptop.
-
Can you post your form?
-
This would be waaaaaaaay easier with a database, but you're basically going to have to read the file into an array, shift part of the array, insert the new content in the blank space and write the data back out to the file.
This is why databases exist. This is a very inefficient way to handle this problem. -
All you have to do is run a seperate query for each with the field in the WHERE clause. Then run mysql_num_rows on it and if you get a value more than 0, then something exists matching that input. After each query, set a boolean variable depending on the result of the mysql_num_rows(). If it's false at any point (meaning one of your mysql_num_rows() results was 0, then skip the rest of the processing and show the form again.
-
I don't understand why you have 2 else statements or why there is a semicolon after the closing bracket of the if/else statements. The semicolon is going to halt execution and not do the else regardless of what else you have.
Also for sessions, just make sure you put session_start(); at the very top of the page (directly after the opening PHP tag and make sure there is no space or HTML before that.
Then all you have to do is set your variables:
[code]<?php
$_SESSION['user'] = $_POST['username'];
$_SESSION['pass'] = $_POST['password'];
$_SESSION['leve'] = $_POST['level'];
?>[/code]
Then as long as you put session_start(); at the top of the rest of the pages you use, you should have access to those variables and you can show or hide different parts of your site depending on what level people are at. And if those variables aren't set, just redirect them to the login page. -
$_SERVER['HTTP_REFERER'] will get you the page it came from.
And yes, you can pass arrays to functions, but leave off the brackets. -
Well, 16:00 would be 4:00 PM.... but beyond that, I'm not sure.
-
[code]$file=file('test.txt');
$count=count($file);
$random=rand(0,$count-1);
echo $file[$random];[/code]
Color me wrong... you don't have to specify a path.
The above works for me. -
Please tell me that this is all generated from the same page and you just want to look at the status of a field in a database of all your users. Please? Otherwise, that's gotta be the worst design of a website I've ever heard of.
-
Good question.
Running your own home web server.
in Miscellaneous
Posted