scootstah
Staff Alumni-
Posts
3,858 -
Joined
-
Last visited
-
Days Won
29
Everything posted by scootstah
-
Can PHP dynamically change .htaccess files?
scootstah replied to Ivan Ivković's topic in PHP Coding Help
Guess I missed the "dynamically" part. Yeah, I don't see why any of the .htaccess rules would need to dynamically change. Except maybe to handle some kind of sub-directory that is dynamically created or something. -
Can PHP dynamically change .htaccess files?
scootstah replied to Ivan Ivković's topic in PHP Coding Help
yeah, I wouldn't really mess around with the .htaccess file using PHP. There should never be a legitimate reason why you would ever need to change .htaccess dynamically. A web-based text editor comes to mind. -
No, they simply hold data given to them by the browser.
-
session variable not working and register_globals question
scootstah replied to ricmetal's topic in PHP Coding Help
Where the errors display depends on how they are handled. They might be set to display on the page or just silently log them in the background. -
Is a way to execute php code which is stored in mysql database?
scootstah replied to Freid001's topic in PHP Coding Help
Why would it be any easier or faster to save it to a database verses save it to a file? It seems that a database connection, selecting the row, and eval()'ing it is a lot more work than simply including a file. -
So what isn't working? Any errors?
-
Can you show us your table layout? You can get that by using this SQL command: SHOW FIELDS tablename; EDIT: And please wrap your code in [ code][ /code] tags.
-
Is a way to execute php code which is stored in mysql database?
scootstah replied to Freid001's topic in PHP Coding Help
You could use eval(), but that is generally frowned upon and there is probably a better way to do what you want. Why, may I ask, do you want to do this? -
reset session timeout without submitting form
scootstah replied to jeff5656's topic in PHP Coding Help
You can't do it with PHP because PHP doesn't interface with the client. But you can run an AJAX request every X minutes. With jQuery: $(function(){ // set interval for 5 minutes setInterval(function(){ $.ajax({url: "keep-alive.php"}); }, 300000); }); -
sugestion - Unreplied Posts
scootstah replied to jorgepinho's topic in PHPFreaks.com Website Feedback
Damn straight. -
Can PHP dynamically change .htaccess files?
scootstah replied to Ivan Ivković's topic in PHP Coding Help
Sure, it's just a text file. -
sugestion - Unreplied Posts
scootstah replied to jorgepinho's topic in PHPFreaks.com Website Feedback
The only thing is, that doesn't sort by newest as well. Like, the most recent posts with no replies. -
sugestion - Unreplied Posts
scootstah replied to jorgepinho's topic in PHPFreaks.com Website Feedback
yes you can, if you notice there is a "show unread posts since last visit" link at the top left of the page (next to your profile picture). This shows all unread posts of all of the sub forums, this can be sorted by reply. UnREAD, not unREPLIED. I too would like this feature. Something like this: http://stackoverflow.com/unanswered/tagged/?tab=noanswers EDIT: OHHHH. I see what you mean. That's nifty indeed. -
Look at yours, now look at mine. Now yours, now mine. There's a difference. The INSERT statement can be broken down like this INSERT INTO <TABLE> (<COLUMNS>) VALUES (<COLUMN VALUES>) You can omit the <COLUMNS> but this means it will want to insert into every column. If you don't specify data for every column, you will get an error. If you have 10 columns and you only want to insert into 3 of them, you'll need to explicitly specify those 3 columns.
-
Means ? PaulRyan post is beneficial for me ? What do you think ? Means that, what you want to do is not possible. If all you want is the time it takes to load the DOM, most browsers do that already. Although I'm really not sure why you even care about such a thing.
-
No, you'd need to get the values from the form using Javascript. It would look something like var short, location, type; short = $('input[name="short"]').val(); location = $('input[name="location"]').val(); type = $('input[name="type"]').val(); $.post("editcalendar.php", { short : short, location : location, type : type }, function(data) { alert("Your event has been created, Close this window."); } ); Now do that for all of your form elements.
-
You could simply use FTP and give each user their own credentials and root directory. They wouldn't be able to access each others files via FTP but if one of them linked via HTTP, they could.
-
Well that obvious: whatever makes them more money. And honestly, I doubt that is going to be ACTA. So hopefully they'll be on our side.
-
Okay, so you are trying to insert a different amount of columns than you specified in the query. Since you didn't specify any columns in your query, it wants to insert data to all the columns. So you need to modify your query and include the column names for the data you want to insert. INSERT INTO `Companies` (company_name, basicpackage_description, location, postcode, upload) VALUES ('$company_name', '$basicpackage_description', '$location', '$postcode', '$upload') Something like that, only with the actual column names.
-
There is never a time that you need register globals on. It is a huge security risk and should never be used.
-
Of course it's possible. Just change the link in the breadcrumb from the query string to the pretty url.
-
Because you did not define the function with this: For the record, you don't have to use the function, you can just do the math if you want. $percentage = round(($students_detention_num / $total_students) * 100);
-
system('mysqldump -u root -proot --all-databases > all_databases.sql');