ober
-
Posts
5,327 -
Joined
-
Last visited
Posts posted by ober
-
-
2 things:
1) Why can't you use if-else?
2) If you're going to use LIKE in your SQL statement, surround the value with %:
$query = "SELECT * FROM $table WHERE student_number LIKE '%".$_POST['txtSearch']."%'";
If this is a school assignment and you can't use if-else, you're probably looking for the ternary operator: http://us.php.net/operators.comparison
-
In the future, please use code tags for readability.
-
You'll want to look at the count function to determine how many elements are in the array which will then allow you to determine which links to show.
You'll also need to read $_GET['art'] to determine the page you are on.
-
It is impossible to go from the form with the right value to the processing with the wrong value, so you are obviously passing the wrong ID.
-
".$board0['posts']."
Why is there a 0 in there?
-
Echo your query before you execute it. Is it getting the right value? Look at the source of the page where it lists out the unaccepted rows. Is it getting the right value?
-
-
I use xampp, and as jcombs notes from his experience with wamp, it was also very easy. So easy in fact, I wish everything was that simple.
Once installed, the default content in htdocs contains an xampp service panel where you can secure your xampp folder, set mySQL username / passwords, etc.. etc.. very easy to install and use.
Ditto here. I used to install separately and that's how I build servers, but for a local dev box, why bother with all that hassle?
I'm curious if anyone has experience with xampp vs. wamp and which is better and why? I've never used wamp and I'm curious if I'm missing anything.
-
I used to own a 30-06 Remington 7000 series rifle. That was when I used to hunt deer. I've moved away from where I used to hunt and now the area I live in only allows shotgun hunting so I sold my rifle. That... and I don't really have a great interest in hunting.
So now I don't own any. But I've shot everything from a pistol to a muzzle loader.
-
I can't personally think of another way to go about it than using cookies. IPs are out for the reasons you stated. You can't store it in sessions and there really is no unique identifier beyond that. Chances are that even the web-savvy people aren't going to go to the bother of deleting the cookie just to vote again. Even if they did, that would be a pain to repeat.
If you wanted to go one step further, you could put some flood control in place by IP and use the cookie method as well, so no one from the same IP could vote again in less than a 5 or 10 minute span. That would be annoying enough to deter people from deleting and voting again right away. You might catch a few people behind a firewall and piss them off, so it's up to you in terms of trade-off.
Sorry, but I can't think of another way to do it.
-
I thought you guys/gals would get a kick out of this... pretty interesting view of the net:
-
I need more sleep... either way though... I don't generally mind that.
-
It makes it impossible to open in the same window/tab even if you want to.
Umm... since when? You can right click on any link and open it in a new tab or window even when the target is set to _blank. I don't know a browser that stops you from doing that. I actually prefer to have links open in a new tab.
-
Yes, it will load that page into memory on the server and look through it. 100 error messages isn't something I'd worry about, however.
However, if these 100 messages can be categorized and only loaded in specific places, then it probably wouldn't hurt to do it. Loading that up on a page that will have no errors is just inefficient. Then again, I've seen worse coding.
-
You need to edit the php.ini file to allow for larger files to be transferred.
-
RSS pages.... you'll need to be a little more specific. You mean an RSS feed? Those are XML files. All you have to do is parse the XML and format it however you want.
-
It would be helpful if you told us what line 413 is.
-
Your variable is $username. Your query is using $userName.
$username != $userName.
Variables are case sensitive.
-
The username and passwords are encrypted using either md5 or sha1. The timestamp is a timestamp. You can use functions in PHP to extract the actual date and time from that value. I have no idea what the location is.
I'm not sure why you would encrypt the userid... that's just silly. I would NOT store the password as plain text however.. that's a security concern.
-
You will need to query the database for the ID. That's not done by passing the value from page to page. The only reason you need to pass a value from page to page here is to determine what record to get the ID from.
-
can anyone see anything wrong with this these lines...
echo "<font color=\"blue\">".$member['username']."</font>";
There is nothing wrong with those lines other than the fact that you are using very old styling methods.
-
Show us how you combined the code. Otherwise we have no idea how the code flows.
-
I copied your code and as long as I take out the bbcode bold tags, I get no syntax errors.
-
The short answer is no. We're not here to promote your products. We're here to help you build them when you get stuck. We don't get anything out of promoting you, so what is the incentive for us to do it?
[SOLVED] include in construct function
in PHP Coding Help
Posted
if(!include("$settings_file"))
Should be:
if(!include($settings_file))
No quotes... it's a variable, not a string.