Jump to content

onemind

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Everything posted by onemind

  1. Hi, I have made a 20 page website that displays my companies online portfolio. It really is just a brochureware site. I have used php include files to include the header and other stuff in a php template system to generate my site layout. My question is, would i be better off running my site with php then clicking view source then copy and paste the generated html into html files and just host the html files rather than the php template script? Or is the call to include() so fast that i would hardly notice the difference and just keep the template system? Basically, for a small site like this, will the php overhead be worth it or not? Thanks for any opinions.
  2. Hi, Does anyone know a good charting library or module for php? I'm after the most well knoown standard or a really good one. Doesn't matter if it is commercial. I need it to chart stock prices on my website. Thanks :)
  3. Thanks guys, So what is the bottom line? Hold off for a while? I mean, i will still learn it in the mean time but does it look as though v4 is still current?
  4. Hi, I have used php 4 alot and haven't attempted php5 yet. From what i can tell, not alot of web servers have made the transition and all my clients ask for php unkowingly running a php 4 server so any php 5 stuff wont work for them. Is it too soon for php5? When will php5 become mainstream do you think? Any insights would be great. Thanks :)
  5. Hi, I am trying to make a script that posts info to certain areas of a myspace profile. Is this even possible with php? I have no idea where to start and would appreciate any tips. Thanks :)
  6. Hi, Someone asked me to include one of their php files in my code that is hosted on their server. I have done this like so: include("http://www.xxx.com/clients/provident/level2/includes.php"); $info = return_user_info($_COOKIE["provident_email"]); echo $info['Last Name']; But i get this error: Fatal error: Call to undefined function return_user_info() Is this even possible? Or do i need to store that include.php file locally? Thanks
  7. Its for bank loan applications. They are long forms and need to be split into several forms. There are 12 forms for bank accounts and credit cards and they are huge and when split make over 100 seperate forms. That webformdesigner actually is quite good for the job and creates standards compliant forms with css and no tables. I dont see why people think some programming tools are the devil. Personally, i prefer productivity over performance - just makes better business sense. But feel free to hand code a job like this using note pad because you are masochistic :p
  8. Thanks but not really what i'm after. The best i have found so far is http://www.webformdesigner.com/ I guess this will have to do. Thanks
  9. I can make them myself. I need to make over 100 forms and all that positioning by hand in going to be as tedious as hell.
  10. Hi, Not really a php question but was hoping you guys could help me. I am looking for a program that lets me design html forms using a wysiwyg editor. Drag and drop kind of thing. I can make forms by hand but was hoping there was a program specifically for creating forms visually. I dont want a full blown web editor, just one for html forms. Any help finding something like this would be greatly appreciated. Thanks :)
  11. Thanks, I enabled short tags in my php.ini Dont worry, i will keep using <?php just turn it on for other peoples code.
  12. Thanks but there is over 100 pages and i would like it canged for future scripts that use the shortcut
  13. Hi, I found a script that i run locally but my php installation doesn't recognize <? as the start of a script so i have to go through and change them all to <?php Is there a way to make it accept <? Thanks
  14. Hi, I have a site where users can upload a logo image for their profile. At the moment, i just upload them to my server and place them in a logos file with each image named the same as their id number. This works fine but am beginning to wonder if it would be faster to store all the logos in blob fields in a database. Or would that be slower? Any opinions would be greatly appreciated. Thanks :)
  15. Thanks, i figured it out. $diff = $ends-$now; $days = intval($diff/24/60/60); $remain=$diff%86400; $hours=intval($remain/3600); $remain=$remain%3600; $mins=intval($remain/60); :)
  16. Hi, I have a datetime field in a mysql database and i want to output how many days, hours and minutes are left between the current date and the future date. So far i just convert the datettime to a timestamp like so: $start = strtotime($began);  Where $began is the current time, basically i just need to know how to convert a timestamp to days, hours ect If i was to minus the current timestamp from the future timestamp. Any help would be greatly appreciated. Thanks :)
  17. Its all good, i figured it out: echo nl2br($text); :)
  18. What? How will that possibly help? Maybe i want clear enough, i have a field in a mysql table of the "text" datatype. When i select a text object from the database and output it with php, the whitespace is gone. I remember there was a solution to this a while back. A certain php function that adds whitespace back to the original text.
  19. Hi, I have a text field in a mysql table and i output it to my page with php. The only thing is, the text outputs fine but it gets rid of all whitespace so there are no paragraphs ect and it looks like one big block of text. Is there any way to preserve the whitespace? Thanks for any info. :)
  20. Hi, I have a header like so: header("Location: errors.php?err=$errors");  Where $errors is an array. When i run this it goes to a site with this address: /errors.php?err=Array How do i pass an array properly? Thanks
  21. thanks guys, I am having some trouble using the right sql command. This is what i have so far: I send the search string to my script $words = $_POST[words]; Then i strip non letter and number characters, remove whitespace and seperate each word into an array. $letters = ereg_replace("[^A-Za-z0-9 ]", "", $words); //removes non letters and numbers $keywords = explode(" ", $letters); //seperates into words foreach($keywords as $key => $value) //removes blanks from array { if($value == "" || $value == " " || is_null($value)) { unset($keywords[$key]); } } This generates a keyword string to use in sql for($i=0; $i<count($keywords); $i++) { if($i != (count($keywords)-1)) $keywords_s .= "'%" . $keywords[$i] . "%'" . " || "; else $keywords_s .= "'%" . $keywords[$i] . "%'" ; } Which creates something like so: '%Search%' || '%for%' || '%this%' I then plug this into my query like so: $get_username = "SELECT id, dname FROM users WHERE dname LIKE $keywords_s"; And it works fine. The trouble i am having now is, i cant use multiple WHERE clauses. What i would like to do is the following: $get_username = "SELECT id, dname FROM users WHERE dname || location || lname LIKE $keywords_s"; But this is invalid sql. Does anyone know a way to compare my keywords with multiple columns? Thanks again
  22. Hi, I have just about finished my site and have many tables filled with users, articles ect and am now trying to implement a search feature. Basicaly, i have a text box that the user enters keywords they want to search for then they click search. Is it just a matter of parsing the keywords then performing several select queries on the database or is there a proper way to search mysql databases? Any tips would be great. Thanks
  23. Hi, I have what i thought was a simple problem but i cant figure it out. All i want to to, is add a value to an in field. eg If i had an int field called number and in it was the value 5, what i want to do is add three to it so number becomes 8. I use the UPDATE method in mysql like so $sql = mysql_query("UPDATE profiles SET positive=$positive, negative=$negative,neutral=$neutral WHERE id=$to") this is supposed to add the int value $positive ect to whats already in the positive column but the way i'm doing it now it just replaces whats in the column. So instead of adding 3 like my previous example to make 8, it replaces the 5 with 3. Hope that makes sense. Thanks for any help
×
×
  • 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.