ober
-
Posts
5,327 -
Joined
-
Last visited
Posts posted by ober
-
-
That's only 2Gb (right now) but it would get you the same thing. There are other options out there as well.
I would never backup my computer files on a shared server.
-
No its not that hard to make a quick sticky. But a) there is a difference between rules and guidelines. What many people think should be rules are actually guidelines, because it is not our duty or desire to be the proverbial grammar police. b) As pointed out, most people don't bother reading the stickies. No point in making them if people aren't going to read them. Even if you link to it as a response to a "bad post," I assure you, they are not going to follow the link and read the sticky.
I couldn't agree more. As far as I'm concerned this discussion is over.
-
So I assume you're not ever posting SQL statements, or if you are you are only doing it through POST? You should also clean POST input, because someone can inject via POST just as easily as they can into GET.
-
Yeah, the easiest would definitely be storing the log file elsewhere, and I know most servers will let you do that.
-
Must be something wrong with your server config... it works fine for me when I copy and paste your code:
Array
(
[0] => 11:00 - 12:00
[1] => 12:00 - 13:00
[2] => 13:00 - 14:00
)
-
OMG... I'm an idiot. I just got done answering an explode thread and my mind was stuck on that.
Mutley, ignore my posts in this thread. I need to go take a break. What you have should work fine with the exception of what Brian mentioned.
-
The output of the form based on his input would be something like this:
time[]=11%3A00+-+12%3A00&time[]=12%3A00+-+13%3A00&time[]=13%3A00+-+14%3A00
So in the PHP, you would have to loop through the "time" variable and combine them.
-
<snip> Sorry Brian, I'm an idiot!
-
That's probably because those results are not separated by commas in $_POST. They are passed as array values.
print_r($_POST); and then you can see what I'm talking about.
-
Create a table in the database that is nothing more than:
PollId | userId
Then when they vote on a poll, add their user id to this table associated with the poll they are voting on. Then before they are allowed to vote, check this table to see if they already voted there. You can take it one step further and only show the results of the poll if they already voted on it.
-
What version of mysql are you using? MySQL doesn't support subqueries until version 5.
-
I'm guessing the other "random text file" isn't in the windows system32 folder? I know it seems like a long way around to the solution, but can you try copying the file to another spot on the drive (assumed to be not so protected), getting the count and then deleting the copy?
-
$str = "Bob;Joe;Jim;Another Example Name;"; $myarray = explode(';', $str); // $myarray is now an array of the various pieces and you can search it using array functions.
-
$query = "SELECT * FROM item WHERE ProductId=".$Prodid;
Try that. If $Prodid is not an integer, you need to surround it in single quotes:
$query = "SELECT * FROM item WHERE ProductId='$Prodid'";
You should also clean the input (the user can alter anything in the $_GET global array).
-
-
Add a column to your user table called "enabled" or something. In your script where the user is added to the database, set that value to 0 when they sign up. Send them the email stating that it will need to be approved at the same time.
Create a listing for yourself that allows you to select users and update them, which just changes that "enabled" field to 1. Then when you check the user as they are logged in, check this field to see if they can login or not. Make sure you send them an additional email when you enable their account so they know they can login.
-
Put a statement outside of the while loop that checks to see if your current column is less than the column max.
Also, why are you putting newlines after each of the elements? Browsers don't read newlines unless you're doing that strictly for the readability of the source (and I'm not even sure that works?).
-
Marking as solved.
-
Thread moved to Misc. There is a sticky at the top of this board about books. Read it.
-
If it is disabled, you'll have to contact your host to see if they will enable it.
-
Explode the string, count the number of elements in the array, and then put the first 2 together if there are more than 2 elements. If there will be instances where there will be more hyphens in the string, it will get more tricky, but that's the basic way to handle this.
-
Are you sure it is updating? I personally have never seen a DB take && for AND in a where clause.
-
I might care... if they put what timezone 8:30-9:30 was in.
-
Will it only be in one?
$sql = "SELECT Device_Code, Chan1_Reference FROM devices WHERE Chan1_Reference = 'CW1002/W' OR Chan2_Reference = 'CW1002/W' OR Chan3_Reference = 'CW1002/W' OR Chan4_Reference = 'CW1002/W'";
By the way, it looks like you don't have your database normalized. Tsk tsk.
Creating a secure file repository
in PHP Coding Help
Posted
I'm not saying you'd always be open to that. But I personally wouldn't trust my shared hosting with my personal files.
Besides, is Godaddy really going to let you store more than 1/2 TB of data on a shared account? (by the way I'm assuming you have a shared account... you may have a VPS or dedicated... I have no idea).