Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Questions regarding msql,php, and css !


  • Please log in to reply

#1
jacobusmatthew

jacobusmatthew

    Member

  • Member
  • PipPipPip
  • 137 posts
Hey everyone, its been a while...I finally got my website up and im really stoked about it. The mission statement of it has changed a little since my last post, but the general idea is mostly the same. matthewjacobus.com is up and running, and over the past few days ive been attempting to finalize the design of the site. At the same time i've been attempting to learn as much php as possible (a quest that is more daunting than i previously expected).

So far, ignoring the fact that i haven't got my head around exactly how to code in php, I've realized that it is possible to use php and the fread operator (forgive me if i use the wrong terminology throughout the rest of this post) to read a template page and then echo that "template" page onto all my other pages. I believe i would use this to create pages that do not have to be manually edited if i want to change the layout. This is all nice and fun, and I have a decent understanding of how to go about doing this.

HOWEVER, can i tell the php script to only read certain lines of my template page as to inject it where it is needed, or will i have to break apart my layout into several smaller html files?

My next question involves mysql or whatever it is i should use. I currently have it installed, so i think ill stick with it. After some searching, I learned that most database programs can read the mysql database files, but can i create them. I have openoffice.org's base program, which seems like it would be a good candidate. I hate text based interfaces, so i was wanting to use a graphical program.

I want to eventually create a database driven website, but im not sure what that actually means. My hope is that i can update the database with text and information. Then, the php will consult the database, and return it (after some scripting) how i specify with some styling. And even further down the line i want to make my page interactive, which again im guessing would mean that if someone inputs text into a form, it would actually write to the database, then when the php reads the database, it will display the new information the user submitted.

My next problem is in regards to the actual layout of my page. If u go to my site, you will notice that i have an area designated to the side. Currently there is nothing in it. I was going to use a series of links that i wanted to be dynamically updated as i added content, but until i reach that point i can settle for static links, that use a white color separated by dotted borders that run 85% of the width of the "sidenav," as i call it. I can emulate this effect perfectly using divs, but the catch is i want the background of the links to change color similar to the links at the top of the page. Because you cannot set link properties to a div, i am not sure what approach i should take in order to achieve this effect.

EXAMPLE:
  • Link 1
  • ...............................
  • Link 2
  • ...............................
  • Link 3
  • ...............................
Sorry, some of those were not questions, they were my attempt to explain what i think i know. I was hoping someone would be able to set me straight on anything i have wrong, and point me in the right direction on how to go about undertaking this.

Thanks,
Matt
  • 0

Advertisements


#2
jpshortstuff

jpshortstuff

    Member

  • Member
  • PipPipPip
  • 119 posts
Hi :whistling:

For your MySQL, i think you should look into phpMyAdmin, for a grpahical way to view and edit your databases. ive never set it up, so i cant tell you if its easy, but ive used it, and its pretty simple. You can either use MySQL commands to perform whatever action, or you can use the interface to navigate and edit, add delete from tables/databases.

As for you layout, im not usre if i understood the question correctly. Why cant you use classes (in css) for the links?

Im not sure exactly what you be going for, but:

.nav-link{
//Normal appearance, you can add your dotted border here
}
.nav-link:hover{
//hover appearance, change background etc
}

and so on, similar to what you did in your bar at the top?

you dont actually need extra divs:

<div id=side-nav>
<a href="thing.html" class="nav-link">LINK</a>
<a href="thing.html" class="nav-link">LINK</a>
<a href="thing.html" class="nav-link">LINK</a>
</div>

This will give you the vertical layout of links, dotted border, changing background and everything. I hope i understood what you meant, i tried this on your site (using Firebug, handy firefox extension) and i think i got the look you were going for (layout wise, not including any details youd obviously want added).

I cant help you with the php question im afraid, im only just getting into it myself, but i do know its easy to interact with your database with php, coule of lines of code you can add information straight into any tables.

Hope some of this made sense and helps,

jpshortstuff
  • 0

#3
jacobusmatthew

jacobusmatthew

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 137 posts
ok, clearly i missed the display: block; css element, which solved all of my design woes. Another thing i had trouble with was making two columns with a width determined by the tallest element, so i did the unthinkable, I used a table for a layout element, but i dont care...hahahaha :blink: . I came across this nifty article, so I didn't feel as bad. but once i settled on a design, I did a complete redesign anyway. Im about half way through PHP Solutions: Dynamic Web Design Made Easy, so hopefully I can make my site actually function. Please go and give me some constructive critisizm. I am a n00b so do not be afraid to be mean. I will listen to what anyone thinks, because if u think it sucks, I want to fix it :whistling: in case you forgot: www.matthewjacobus.com

also, can i just put copyright at the bottom, because according to what ive read i only need to register the copyright, if i file a law suit. Otherwise everyone is protected under an automatic copyright, or something along those lines.

Matt

Edited by jacobusmatthew, 25 July 2007 - 06:12 PM.

  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP