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 03-21-2005, 07:41 PM New Site help needed
Novice Talker

Posts: 8
Trades: 0
I started learning mysql and php around two weeks ago and have created a site it is at http://laptopupdate.siteburg.com its still under construction so anything besides the headline doesnt work the menu are all dead links meanwhile.

When you click on the headline of a leading article it directs you to a page called article which shows only the article you called and nothing more the problem is that if you actually type in the page article.php but without alll the garbage ?id=whatever that comes after it it will return an error.

and a css question I have a body and a bigdiv which has the whole box of stuff in it header menu maincontent and footer it is left margined 115 px, how do i instead center it and how do i get it to stop bumping the inline siteburg advert to the right

also what do you recommend I do for a comment system that allows readers to add comments and if you have any other tips and suggestions they will be gladly accepted

thanx
dodgyknacker is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-22-2005, 06:13 AM
flish's Avatar
Novice Talker

Posts: 6
Location: Bucharest, Romania
Trades: 0
im very new to php and mysql as well but what i understand is:
1. Your article.php doesn't have any content at all actually. Anything it displays it takes from the database when someone makes a request.
But I do think it should return a just the page with nothing on it. Maybe you should try some error trapping. The message you get also suggests where the problem lies.
2. As for your CSS... I counted like 6 div tags without any use at all. You just open and close them... Im not sure why. But I didnt read the whole page cause its kinda messy and might be more tags you could just erase without affecting the way you page looks. After that you'll see more clearly.
If you used a HTML / CSS editor or any kind of what-you-see-is-what-you-get editor then change it.
flish is offline
Reply With Quote
View Public Profile
 
Old 03-22-2005, 07:13 AM
david's Avatar
King Spam Talker

Posts: 1,314
Location: Glasgow, UK
Trades: 0
In the article page I assume you've got something like:
PHP Code:
$id=$_GET['id']; 
or similar. All you need to do is to add:
PHP Code:
if(!isset($_GET['id']))
$id=0
where 0 is the default page you want to display. Or alternately have a completely different page enclosed within that if, and have the rest of your code in an else:
PHP Code:
if(!isset($_GET['id']))
{
// Code for handling the default page
}
else
{
// Your existing code

It might also be worth putting in some error checking (check its an integer that is put as an argument etc.) at the same time.
__________________

Please login or register to view this content. Registration is FREE
- Everything a webmaster needs - for free

Please login or register to view this content. Registration is FREE
- Free web hosts reviewed and rated

Please login or register to view this content. Registration is FREE
- Impartial hosting directory - Add your host today for FREE
david is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to New Site help needed
 

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.11518 seconds with 12 queries