Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 07-20-2010, 01:42 PM Basic PHP Questions
Experienced Talker

Posts: 45
Trades: 0
What I'm trying to do is fairly simple but I'm a beginner with no experience in php so I decided to turn to the most helpful forum community on the internet.

If you could answer these few questions please

1. Could I save my "Index" as an HTML file and have PHP coding in it? What the PHP Is going to do is the following things listed below.

Can I do/ How if possible this coding

1. I want to randomly pick a "row" in the database when the "Index" file is requested. The "row" will contain four-five columns consisting of "Meta keywords," "Meta description," "HTML," + more. Throughout the rest of the "Index" file I'm going to use the data in the columns of the random row that was chosen. How would I do this?

2. What PHP code would be needed to insert the keywords/ meta descripts?

3. What Php code would be needed to insert the html into the page?

Alright, don't think I just want someone to write the code for me. Right next to me is the book PHP 5 by Steven Holzner I just can't find the exact information I need. I'm still learning and thanks to anyone who helps.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
Thizzle is offline
Reply With Quote
View Public Profile Visit Thizzle's homepage!
 
 
Register now for full access!
Old 07-20-2010, 01:49 PM Re: Basic PHP Questions
Novice Talker

Posts: 8
Name: Jenny Codner
Trades: 0
Your web server won't execute the PHP code if the extension isn't .php. So saving it as a .html won't work.

On your other questions, I'm not quite good with MYSQL operations. So I hope someone else can answer

Below link might be useful.
http://www.w3schools.com/PHP/php_mysql_select.asp
JenJenn is offline
Reply With Quote
View Public Profile
 
Old 07-20-2010, 02:05 PM Re: Basic PHP Questions
Experienced Talker

Posts: 45
Trades: 0
Well thats one questiond down... I mean I'm looking for the answer in this book on my own it's just hard as hell to find. Unfortunately I can't Query a book for matching context. <<< Nerd Joke.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
Thizzle is offline
Reply With Quote
View Public Profile Visit Thizzle's homepage!
 
Old 07-20-2010, 02:22 PM Re: Basic PHP Questions
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.tizag.com/mysqlTutorial/
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-20-2010, 03:18 PM Re: Basic PHP Questions
Defies a Status

Posts: 1,606
Trades: 0
Quote:
Originally Posted by JenJenn View Post
Your web server won't execute the PHP code if the extension isn't .php. So saving it as a .html won't work.

On your other questions, I'm not quite good with MYSQL operations. So I hope someone else can answer

Below link might be useful.
http://www.w3schools.com/PHP/php_mysql_select.asp

Your web server will execute php inside of of an HTML page if you edit your .htaccess file to tell tell it it parse HTML as PHP. On 99.999% of severs it won't work unless you do that.
__________________
Colbyt

Please login or register to view this content. Registration is FREE
colbyt is offline
Reply With Quote
View Public Profile
 
Old 07-20-2010, 11:36 PM Re: Basic PHP Questions
vivekar's Avatar
Webmaster Talker

Posts: 612
Trades: 0
Getting random rows is a bit tricky.

http://edrackham.com/featured/get-ra...order-by-rand/

If your table continuous IDs, then use the snippet from the above URL.

In order to add HTML content into your tables, you can use a good WYSIWYG editors such as CKEditor (it's free).

Hope that helps.
__________________

Please login or register to view this content. Registration is FREE
(Active since 2003) |
Please login or register to view this content. Registration is FREE
vivekar is offline
Reply With Quote
View Public Profile Visit vivekar's homepage!
 
Old 07-21-2010, 05:02 AM Re: Basic PHP Questions
Banned

Posts: 1
Trades: 0
I need some code for rss feed.Can anyone help me.
sara12588 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Basic PHP Questions
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.21396 seconds with 12 queries