Jump to content

freebsdntu

Members
  • Posts

    56
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

freebsdntu's Achievements

Member

Member (2/5)

0

Reputation

  1. I guess it means your resultset is empty,try to debug on that. By the way,is that all the code? If yes,you have to connect to your database first before any operations on it.
  2. I am not sure if there is such a built in function. But I believe you can surely write one yourself.
  3. Thank you for all your inputs, I think I have got it. Thank you very much!
  4. This sounds rationale, but what if I do it like this : 'Hello Word"\n"', it still does not work. I guess I need to check with the escape characters. Since I would have "" symbols inside "" of echo
  5. Thank you for your help, but the problem is not solved, i have a series of echo statements, if I remove \n, then there won't be carriage returns.
  6. I have tried echo 'Hello World!\n', and the out put is like this: Hello World\n I don't know why it is like this.
  7. I guess you just need to configure your apache,then it will be fine
  8. Thank you very much for your kind reply,Daniel0. It is very helpful to me. What I intend to do is do it in a modular fashion, with MVC pattern, ya, but I don't want to try the template engines like cakephp, smarty, etc. I would to create one on my own, also to cater for my own needs. Ok, let's say, in my template, there will be head section, menu section,sidebar section,main content section,footer section,etc,what I am trying to do now is to build a separate .tpl file for each section, but with customizable functionality, i.e. when applying the template head, I shall be able to specify the title of the page. What do you think of my approach? Any suggestions? It is still in my mind, I haven't have clear thoughts how to realize it in codes. So inputs would be greatly appreciated!
  9. You have syntax error in your echo statement,first of all. I suggest you do a google search on the tutorial.
  10. Try to add a ";" after your first die statement. <?php #connect to MySQL $conn = @mysql_connect( "----", "----", "----" ) or die( "Could not connect" ); #select the specified database $rs = mysql_select_db( "votick_banner", $conn ) or die (mysql_error()); ?>
  11. Any reason why never use @? I use @ sign in this situation, it works fine. I suggest you post the banner.php,Vivid Lust, according to the error message,something is wrong on the 6th line. Also, did you do correctly with the database connection setup? Is your $conn successful? Just my 2 cents.
  12. Hi guys, problem regarding template again. How do you write template?In php?Or to write in tpl file?Regarding tpl,how to write?I have searched on tpl, but haven't found any examples on how to write a tpl file. Thank you very much!
  13. Hi guys, I would like to write a template for my personal site, because as I am expanding the site, I find it tedious to correct for each page whenever I make a small change. Any suggestion on where should I start?Thank you very much!
  14. LOL, you are over-praising me, I am just a php starter.
×
×
  • 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.