Jump to content

dereko

Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Contact Methods

  • MSN
    smeghead@redbrick.dcu.ie
  • Website URL
    http://www.jeebers.com
  • Yahoo
    ruffins367

Profile Information

  • Gender
    Not Telling
  • Location
    Ireland

dereko's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It means you have echoed information to the html already and PHP can't write to two differnt locations... you can however get around this by buffering the html before you output it. Put // This function will turn output buffering on. While output buffering is active no output // is sent from the script (other than headers), instead the output is stored in an internal buffer. ob_start(); // This allows me to call the header() function in the included files for redirecting at the start of your php file. and .. ob_end_flush(); // flush buffer content to the screen at the end of your php file. it is important that you put the ob_start before anything else on the page as it may try to display information.
  2. It means you have echoed information to the html already and PHP can't write to two differnt locations... you can however get around this by buffering the html before you output it. Put // This function will turn output buffering on. While output buffering is active no output // is sent from the script (other than headers), instead the output is stored in an internal buffer. ob_start(); // This allows me to call the header() function in the included files for redirecting at the start of your php file. and .. ob_end_flush(); // flush buffer content to the screen at the end of your php file. it is important that you put the ob_start before anything else on the page as it may try to display information.
  3. You shouldn't name your include files like "file.inc" try naming them "file.inc.php" .. problem solved. no reason why you should name them .inc over .inc.php Also if you leave your "file.inc" files in the web directory people will be able to view the source by going to www.yoursite.com/file.inc and therefore this is a security issue epesically if you have database username and passwords in there. If you still want to use the .inc naming convention make sure the include files are in a folder that is not accessable via a browser. Arbritary file paths is not a deterent to a hacker.
  4. I learned PHP and HTML(orXHTML) by hand coding first and I think you will never go far in the industry unless you do this. Now that I have learned these sufficently I now use tools based on how much time they will save me. In general any web app or dynamic website is going to have a HTML/CSS user interface. For me dreamweaver is ideal for this side of things, hand coding everthing in HTML is not cost effective anymore for anyone. Dreamweaver's build in PHP/MySQL functions are poor at best and I think it is best to stay away from them. I usually just write it all by hand in dreamweaver, as it still has nice syntax highlighting, shortcuts for previewing pages, site management as well as intergrated FTP which is a must as most sites exist on external servers. For all general editing purposes I use EditPlus (IMHO the only text editor you would ever need) which also has syntax hightlighting, and integrated FTP support. I've been trying to find good extensions to make life easier for writing PHP code and VDaemon appears to have some good stuff although have not fully tested them. I have to admit I have never worked in the Zend Studio enviroment and possible I should try it out. I use Windows XP/Apache2/PHP/Mysql for my development and syncronize with the live site usually on Linux/Apache/PHP/mysql. Would people say it is worth my while investing in Zend Studio?
  5. Ok, I was a bit vague after reading it again. I have a situation in my database design where Clients can have many Brands Brands can have many Products Products can have many Projects Now basically this PHP/Mysql application that allows this company to keep track of all there work they do for there clients among other things. The application allows the user to add/edit/change status(active, inactive) of new clients,brands, products and projects. The problem as it where is, A project may be assosicated with a product and/or brand. But I must also allow for a situation where there is no product or brand assosciated with the project. So effectively it is just associated with a client. So what I did and admittly I\'m not sure it is the best way to do it, is: When a person adds a project that is not assosciated with a brand or product I create a new brand and new product with the same name as the client so this way I know if client name = brand name then there is no brand assosicated with this project etc. Also if the \'default\' brand or product already exists then I just hang the new project off the already created default brand or project. You see when I started out doing the database design, I couldn\'t see a way to allow for this in just pure MySQL/database design, so I made this ad hoc way of dealing with it. So from what you see there, is there something I could have done different to make it more simplier.
  6. Hi, I\'ve have a fairly good idea about database design, normalisation etc.. I have an unusual situation, This is a basic view of what I have >TABLE Client id PRIMARY name > TABLE Product id PRIMARY client_id name >TABLE Project id PRIMARY product_id name Now the way it works is, if a person enters in a new project that has no product it creates a default product with its \'name\' the same as the client \'name\'. My problem is, if a person then edits the client \'name\' i need it to automatically update the the default product \'name\'. Now I can just add this to my php code so it does it, but is it possible to set it up in mysql so that if a certain field must always equal another field in differnt table. Also is there any way of recording relationships between tables in mysql. And then a tool to automatically create a dababase design diagram? I post this as discussion as much as a problem that needs to solved, anyone any thoughts on this kind of thing? Does Oracle(I have no experience with it) for example handle relationships better? Derek
  7. Ok, I was having problems with a certain setup of Apache so I deleted everthing to do with it except the www folder where the website was stored. Now I just realised the Apache service is still running. How can I stop it now that i have deleted the apachectl exe?
×
×
  • 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.