Jump to content

Roelandje

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Roelandje's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Awesome... Things are sometimes easier then I expect them to be. Thanks for the help. and thanks Requinix
  2. He says i shouldnt use htmlentities() for it. That pin-points the problem, but doesnt solve it for me. Do you happen to know what i should use instead of htmlentities()?
  3. Yes, I allready have the mark-up in the PHP. I thought there wouldnt be any harm in trying to put the mark-up in it again. Anyways, It doesnt work with or without the markup, It just puts out the code in plain writing. Still haven't it figured out.
  4. I see, What I've tried now: I made a .txt file with the markup and the image i want to show on one line, I call it images.txt. like so <!DOCTYPE html><html><head><title>blabla</title></head><body><a href= the whole image thingy></body></html> But it puts out that code in plain writing. It doesnt understand i want it to be treated as HTML instead of TXT. I also tried to save the file as images.html in stead of images.txt... But still, it puts out the code in plain text. This was what you ment, right? Do you happen to see what i do wrong here? Thank you. Roeland
  5. What i mean is I have a PHP code that reads a .txt file. It randomly picks a line and shows that. Now, I wonder if there is a way i can do the same thing, but instead of showing sentences from a .txt file, showing HTML codes. So, i can also randomly pick pictures and not just sentences. Thanks for your reaction, tho
  6. Awesome! Thanks guys, I got it to work. Does any of you happen to know if this same procedure would work for html documents?
  7. Hey Requinix, Do you mean like just a sentences without any type of code in it? Because I tried that and it didn't work.
  8. Hello everyone, I need to figure out how i can randomly echo a sentence from a file. I have this piece of code, wich i didnt write myself, but what should work: $zinnen =@file("../data/language.txt"); if ($zinnen) $zin = htmlentities($zinnen[mt_rand(0, count($zinnen)-1)]); Then if i Echo $zin, It should give me one sentence from the file 'language.txt'. Does any of you have a clue of how i should compose that 'language.txt' file? I need a small example. Thanks in advance. Roeland
  9. Thanks Pete, Got it working. Thanks for your clear answer! greetz
  10. In order to see if your script works, You need three things: - A database, in your case PostgreSQL - PHP - A server, use Apache. If you dont have any idea of what you;re doing, i suggest you download the WAPP-server. It's one package that installs everything for you. Postgres, PHP and Apache. To learn the basics of PHP, just download or buy PHP for Dummies. In the end, its all logics and if you basically know whats happening in a PHP script, you can always try to make sense of it. Google helps a lot too. The code to connect to a database in postgres from PHP is pg_connect(''). So if you google that, you'll find a tutorial about it. It's a hobby with a load of trial an' error. But the sensation when you get things to work is ridiculously satisfying. I wish you the best of luck. Oh and PS. Notepad sucks. I use Dreamweaver from Adobe to make my PHP, but offcourse you have to buy the program. I suggest you download ConTEXT. It's free and it works fine.
  11. Hello everyone, In my PHPpgAdmin, i have a server connected to my localhost. Server Host Port Username Actions PostgreSQL localhost 5432 greendeal_admin Log out Now, i want to change the 'Host'. I want to change from localhost to the server im using now. Does anybody know how i go about doing that? Thanks in advance Roeland
×
×
  • 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.