Jump to content

marf

Members
  • Posts

    56
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

marf's Achievements

Member

Member (2/5)

0

Reputation

  1. I've been looking at a couple PHP wiki's at work, trying to decide which one we will use. The list I'm looking at is here http://en.wikipedia.org/wiki/List_of_wiki_software and the wiki's will be used by alot of groups at the company, and theres over 500 employees. So, I was reading about wiki's that use Database, and others that use flat files. Basically what we will want is a Well known wiki, commonly supported by community (don't want to use a wiki that stops a couple months down the road and isn't supported), and that is managable for multiple groups. I was reading places about whether to use FlatFile or Database. This page here http://www.pmwiki.org/wiki/PmWiki/FlatFileAdvantages Seems to favour flat files alot, however we have access to mysql database, and all that, so thats no issue. So if this wiki is going to be used by alot of people, and probably eventually get over 10k even 20k pages, what would be the best solution? Personally I don't want to use flat files, I would prefer mySQL but they way they talk in that link, flat files sound too good to be true. Any Advice? Thanks.
  2. I have used cron jobs before with PHP on Linux/Apache machines. However I'm making a PHP application for windows 2k3 server running IIS6. How do I go about making a service to execute a php script? I was thinking that I would have to add php.exe to the PATH and then perhaps a batch file to execute the php file? Any advice? Thanks
  3. Figured out the problem.. Ahh I see sombody posted the same thing I jsut put <?php Header('Cache-Control: no-cache'); Header('Pragma: no-cache'); ?> before all the php on my list.php page. and it worked like a charm.
  4. I'm surprised, nobody else has encountered this? Should I be using Prototype or moo?
  5. I've been encountering this problem recently and only seems to be with IE6/7. Mozilla is fine. I have a basic HTML page, and I also have a simple AJAX HTTP Request script to load a list.php into a <div id="content"></div> The list just grabs a simple list from MySQL. It all works perfectly fine. The list shows up fine. I go into PHPMyAdmin and add another item to the list, and when I go back to the page in IE6/7 the old outdated list shows. I press refresh, and still nothing. I do the same in Mozilla and the list is updated. I found that if I go to Tools > Internet Options > Browsing history Settings, and check 'Check for new pages each time page is visited' it WILL work in IE7. However I can't tell everybody who visits my page to change this setting in their browser. Stupid thing is When this setting isn't changed, if I press refresh, it will refresh the HTML page, but it doesn't seem to refresh the list.php page that the AJAX is calling. Has anybody else encountered this? Maybe my javascript is poor, should I go to use prototype AJAX http req? would that give me better luck?
  6. I was just under the impression that a foreach loop's runtime is faster than while loop, the same way a Turnery operator is faster than an if/else
  7. when using mysql_fetch_array($result) I usually toss that into a while loop like so while($row = mysql_fetch_array($result)){ ... } however I was wondering if there was a way to put it in a foreach statement like so foreach(mysql_fetch_array($result) as $row){ ... } Is that legit? Will this work?
  8. is any one method "faster" or more Efficient in the SQL? like does a query with SQL_CALC_FOUND_ROWS execute faster than count(*) ?
  9. I know how to do this, but my question is I have come across 3 ways. First is SELECT count(*) Second is SQL_CALC_FOUND_ROWS Third is $result = mysql_query(...) mysql_num_rows($result) So what is the norm? What is best practice these days? I know that count(*) is the older method and I think its depreciated, SQL_CALC_FOUND_ROWS is for version 4 and up I believe.
  10. This should be fairly simple I think. I want to perform basically this SELECT * FROM database WHERE date='2006-00-00 00:00:00' Will this work? I want to select all the entries where the year is 2006. I'm not sure if this will specifically look for 2006-00-00 00:00:00.. logically to me I would want date='2006-XX-XX XX:XX:XX' but SQL doesn't like that of course.
  11. hehe thanks I figured that part out now. I have another problem on the other post here
  12. ok forget everything I said above as I have narrowed down the problem. I use this to call the javascript <form action="add_laptop2.php" onsubmit="return formSubmit(this, 'add_laptop2.php');" method="POST"> and then look below function formSubmit(thisForm, pageURL){ alert(thisForm.elements[0].value); //THIS WORKS AND Shows the Value secondFunction(thisForm); return false; } function secondFunction(thisForm){ alert(thisForm.elements[0].value); //THIS Doesn't show, the alert window shows undefined } So why does it not show in the second function but in the first one its fine? I tried assigning it to a variable in the first one and passing and still no go... any ideas?
  13. Anybody know if theres something special to get this.elements[0] working? I basically have my ajaxhttpreq.js which the function in that file has a for loop like ... for(var i=0;i<thisForm.elements.length;i++){ if(thisForm.elements[i].type == "text"){ formData = formData + thisForm.elements[i].name + "=" + escape(thisForm.elements[i].value) + "&"; } ... but formData is ALWAYS empty, no matter what. Why is this? I call this function with onSubmit = "return ajaxreq(this,"myfile.php");" in my <form> tag so that looks legit.
  14. I am currently wondering how to go about this. I have lets say index.php with all kinds of divs and such. One of the divs, I have load signup.php within the div using XMLHTTPRequest. So that form shows up perfectly fine within my div. However what I'm wondering is, when they fill in the form and click Sign Up, I will of course do the necessary database insertions/confirmation e-mail, and I want it to Load a new page in the Div. What I'm wondering is do I have the <form> in signup.php do a post or get action, and will pressing submit cause the actual loading of a whole new page? because I don't want it to load a new page, I just want it to do the necessary php code and then return a value to the Div saying either (completed) or (error). Anybody done anything similar to this? Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.