473,624 Members | 2,543 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trying to build a database driven website

Hello, I'm trying to build a database driven website for a library
management system. The database is stored on a remote server which all
of my team mates can access. I've installed MySQL, PHP and Apache on
my machine. I'm a beginner and I really don't understand how to
proceed. My biggest problem is how to connect to the database on
remote mysql server ? Does php allow this kind of thing ? I'm
interested in a web interface on my machine and a database on reote
server. Are there any tutorials/books you would like to recommend ?
Sep 24 '08 #1
25 2786
On Wed, 24 Sep 2008 12:41:20 -0700, pereges wrote:
Hello, I'm trying to build a database driven website for a library
management system. The database is stored on a remote server which all
of my team mates can access. I've installed MySQL, PHP and Apache on
my machine. I'm a beginner and I really don't understand how to
proceed. My biggest problem is how to connect to the database on
remote mysql server ? Does php allow this kind of thing ? I'm
interested in a web interface on my machine and a database on reote
server. Are there any tutorials/books you would like to recommend ?
http://us3.php.net/function.mysql-connect

--
I told you this was going to happen.

Sep 24 '08 #2
pereges wrote:
Hello, I'm trying to build a database driven website for a library
management system. The database is stored on a remote server which all
of my team mates can access. I've installed MySQL, PHP and Apache on
my machine. I'm a beginner and I really don't understand how to
proceed. My biggest problem is how to connect to the database on
remote mysql server ? Does php allow this kind of thing ? I'm
interested in a web interface on my machine and a database on reote
server. Are there any tutorials/books you would like to recommend ?
I learned tons of PHP and Database integration using this book:

PHP and MySQL Web development

# ISBN-10: 0672329166
# ISBN-13: 978-0672329166

Scotty
Sep 25 '08 #3
Rob
On Sep 24, 8:41*pm, pereges <Brol...@gmail. comwrote:
Hello, I'm trying to build a database driven website for a library
management system. The database is stored on a remote server which all
of my team mates can access. I've installed MySQL, PHP and Apache on
my machine. I'm a beginner and I really don't understand how to
proceed. My biggest problem is how to connect to the database on
remote mysql server ? Does php allow this kind of thing ? I'm
interested in a web interface on my machine and a database on reote
server. Are there any tutorials/books you would like to recommend ?
Programming PHP from O'Reilly is probably a good place to start -
http://www.amazon.co.uk/Programming-...dp/0596006810/

Rob.
Sep 25 '08 #4
pereges wrote:
Hello, I'm trying to build a database driven website for a library
management system. The database is stored on a remote server which all
of my team mates can access. I've installed MySQL, PHP and Apache on
my machine. I'm a beginner and I really don't understand how to
proceed. My biggest problem is how to connect to the database on
remote mysql server ? Does php allow this kind of thing ? I'm
interested in a web interface on my machine and a database on reote
server. Are there any tutorials/books you would like to recommend ?
For what little it's worth, about page generation in the general case:

I think database driven websites are fine for large complex sites, but
not so well suited to anything less than large top-dollar installations.

If so (if large and demanding) Drupal is hard to beat. It does have a
bit of a learning curve but it's not all that hard to bring online if
you're content to leave it's native look and feel basically as is. It is
damn difficult to learn how to really tweak it (I tried but gave up on
it, I was just fiddling anyway).

But (for large sites) its page caching is so well done it runs quickly
and reliably with built in search and half a million plugin modules.
So, for sites that warrant, you might be better off learning Drupal than
fighting through building from scratch.

But if you are determined to roll your own, you might want to consider
building around a files-based system. If you use a PHP wrapper that
sucks in files for div contents (rather than behind the scenes mysql
queries) the system runs faster and it's a hell of lot easier to
munge the content.

With a files-based system you can search and replace recursively with
bash perl and sed, without having to fight with complex sql dumps and
updates.

.....I did it with directories. Each page is actually a specially-named
directory containing files that are html fragments, that get sucked in
as div contents, where positioning and appearance are controlled (as
much as possible) by css.
Sep 27 '08 #5
doznot wrote:
pereges wrote:
>Hello, I'm trying to build a database driven website for a library
management system. The database is stored on a remote server which all
of my team mates can access. I've installed MySQL, PHP and Apache on
my machine. I'm a beginner and I really don't understand how to
proceed. My biggest problem is how to connect to the database on
remote mysql server ? Does php allow this kind of thing ? I'm
interested in a web interface on my machine and a database on reote
server. Are there any tutorials/books you would like to recommend ?

For what little it's worth, about page generation in the general case:

I think database driven websites are fine for large complex sites, but
not so well suited to anything less than large top-dollar installations.
I have a lot of database driven sites which are small and definitely not
"top dollar". It's valid for any time you need dynamic content.
If so (if large and demanding) Drupal is hard to beat. It does have a
bit of a learning curve but it's not all that hard to bring online if
you're content to leave it's native look and feel basically as is. It is
damn difficult to learn how to really tweak it (I tried but gave up on
it, I was just fiddling anyway).
There are others which are also good - Joomla, Smarty, etc. Yes, Drupal
can be difficult to configure - but it's much more than just a "database
driven site". It is a full CMS with lots of feature. Something
entirely different.
But (for large sites) its page caching is so well done it runs quickly
and reliably with built in search and half a million plugin modules.
So, for sites that warrant, you might be better off learning Drupal than
fighting through building from scratch.
Actually, I've found it to be just the opposite. I use it and like it -
but for a large site, I would be looking at something else. Drupal
requires a lot of system resources (especially CPU).
But if you are determined to roll your own, you might want to consider
building around a files-based system. If you use a PHP wrapper that
sucks in files for div contents (rather than behind the scenes mysql
queries) the system runs faster and it's a hell of lot easier to
munge the content.
What do you think a file system is - other than a simple type of a database?
With a files-based system you can search and replace recursively with
bash perl and sed, without having to fight with complex sql dumps and
updates.
Even easier to do with a SQL database.

....I did it with directories. Each page is actually a specially-named
directory containing files that are html fragments, that get sucked in
as div contents, where positioning and appearance are controlled (as
much as possible) by css.
Much more complex than using a database. Also prone to file locking
issues, etc. - which a database handles automatically.

Sorry, but it sounds to me like you don't have any real database
experience to base your comments on.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===

Sep 28 '08 #6
Jerry Stuckle wrote:
doznot wrote:
>I think database driven websites are fine for large complex sites, but
not so well suited to anything less than large top-dollar installations.

I have a lot of database driven sites which are small and definitely not
"top dollar". It's valid for any time you need dynamic content.
Totally agree.
>With a files-based system you can search and replace recursively with
bash perl and sed, without having to fight with complex sql dumps and
updates.

Even easier to do with a SQL database.
MUCH easier to do with a database.

>
>....I did it with directories. Each page is actually a specially-named
directory containing files that are html fragments, that get sucked in
as div contents, where positioning and appearance are controlled (as
much as possible) by css.

Much more complex than using a database. Also prone to file locking
issues, etc. - which a database handles automatically.
Yup.
>
Sorry, but it sounds to me like you don't have any real database
experience to base your comments on.
I fully agree with Jerry on all points here. Using a database for data
driven web sites is the way to go. It is much simpler than handling files.
Sep 28 '08 #7
sheldonlg wrote:
I fully agree with Jerry on all points here. Using a database for data
driven web sites is the way to go. It is much simpler than handling files.
1)
Seems to me file locking is only an issue on update. So if the site is
administered by a single admin, this isn't an issue. If the site
isn't administered by a single admin, then it isn't the "simple" sort
of site I was talking about.

2)
content updates:
So, let's say you have links to other websites scattered over multiple
content blocks in multiple pages (outside the generated navigation
system) and one or more of those links has changed.

These links don't exist as a labeled table column, so you cannot find
them directly with a query. You would have to query all html fragments
in the system with multiple queries, suck those into memory and then right
some code to search and replace the errant link. And then to update
again, and each update would have to be custom written for each
fragment (main display, right column, footer, whatever).
Or you'd have to spend all day using a GUI.

With a files based system I use recursive perl search and replace,
which is so simple do it from the command line, rather than writing
query, search, replace, update code into a use-once file.

......generatin g pages with PHP doesn't mean maintenance and changes have
to be done that way. Bash perl sed and sometimes awk are too convenient
to throw out the window.

No database experience? I started with Oracle in 1995.
That won't win any contests here, but it represents a lot more
experience than none. I don't want to start a name calling fight.
But I do think there is an important "small site" niche for a files
based system.

Sep 28 '08 #8
doznot wrote:
sheldonlg wrote:
>I fully agree with Jerry on all points here. Using a database for
data driven web sites is the way to go. It is much simpler than
handling files.

1)
Seems to me file locking is only an issue on update. So if the site is
administered by a single admin, this isn't an issue. If the site
isn't administered by a single admin, then it isn't the "simple" sort
of site I was talking about.

2)
content updates:
So, let's say you have links to other websites scattered over multiple
content blocks in multiple pages (outside the generated navigation
system) and one or more of those links has changed.

These links don't exist as a labeled table column, so you cannot find
them directly with a query. You would have to query all html fragments
in the system with multiple queries, suck those into memory and then right
some code to search and replace the errant link. And then to update
again, and each update would have to be custom written for each
fragment (main display, right column, footer, whatever).
Or you'd have to spend all day using a GUI.
I am sort of jumping in here to give my opinion and past usage.
It seems to me (from experience) that if you have a Table for all links,
it would be simple enough to use a descriptive label in one field with
the link code in another.

Query the DB, pull in the links table and place it in an array, keys
being the label for each page that requires the links whether it be on a
navbar or separate block.

Then wherever you want to display the link you pull it from the array
that is available throughout the page.

Maybe I am over-simplifying this but it works for me.

Now I have never done file base dynamic sites, so it is hard for me to
compare.

Scotty
>
With a files based system I use recursive perl search and replace,
which is so simple do it from the command line, rather than writing
query, search, replace, update code into a use-once file.

.....generating pages with PHP doesn't mean maintenance and changes have
to be done that way. Bash perl sed and sometimes awk are too convenient
to throw out the window.

No database experience? I started with Oracle in 1995.
That won't win any contests here, but it represents a lot more
experience than none. I don't want to start a name calling fight.
But I do think there is an important "small site" niche for a files
based system.
Sep 28 '08 #9
FutureShock wrote:
REtable for all links.
Links often exist as entries in a named column somewhere,
as part of the navigation system.

But most systems also work with html fragments for the more
variable "display" portions of a page. If a display block
has a link (perhaps and editorial page referring to news stories
out on the net) then that link is not in any directly queryable
column.

And links to newsy items on other sites is a good example. Many
such links do continue to exist for a long time, but they often
get modified by the remote system after a certain period of time.
I often find myself updating links that still exist, that have
been changed by some remotely-located and unknown sys-admin.

.....and if those links are part of text block fragment, which
is common, then query is difficult. Recursive perl over directories
and files is a snap.
Sep 28 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2606
by: _andrea.l | last post by:
how to build a interfaces (or web pages) in easy way? how to build a form in easy way? how to automate and create web pages whit a tool? which tool to use to create form for a database? I mean there is a way or a tool which help me to build an interfaces (web pages) to deal with the data in a database ? Tahnk you in advance, Andrea.
0
577
by: ssp2000 | last post by:
We want to develop database driven website. because of enormous amount of data (300GB) customers's tech advisors are insisting on using SAN instead of any direct attached storage method. I want to know what issues need to be considered while using SAN in web solutions.? Which database server/ product is best suited for such kind of job ? Can anyone suggests good informative articles on this subject , available on web?
0
5591
by: Rob Young | last post by:
This is the latest in the "Total Non-Programmer" series. Any feedback on the usability of this tutorial would be greatly appreciated. Thanks, Rob How to Build A Web Database (Without Programming) This article will teach you step-by-step how to add interactive database-driven capabilities to your existing web site. When the steps
1
1156
by: Mark | last post by:
Hi, I have a website that is created dynamically from informaiton pulled from a SQL database. The page is shown by getting the page ID from the querystring and then retrieving the associated page text from the database and displaying this information inside an aspx template. e.g
1
2762
by: Red | last post by:
Hi, Can someone give me a starting point, as I can't figure this out myself. I want to create a breadcrumb trail on a site, but instead of being generated by cookies or a directory structure, it needs to be database driven. My website details hundreds of products, each belonging to a category. Each category can belong to a parent category, and so on. My site will feature master/detail pages, and both need to feature a
14
1999
by: Mikee Freedom | last post by:
Good Morning all, New member to the list, hoping you might be able to give me some much needed advice. Basically, I have a client who would like to offer the ability for his users to have their own independent website at his domain. It is not as clear cut as that but as a generic description it will do. I know such services exist and I'm by no means emulating there's in any
3
1762
by: Nymus | last post by:
I would like to use an access database as a shared database on a remote website. I don't know if it is possible, but this is what i would like to do with this database: - Use it to run a database driven website - Maintain it via a client application and via the website. As i would like to maintain it both locally and remote via website forms written in ASP, I don't want to sync the information between the server and a client database. I...
0
1340
by: Nymus | last post by:
I would like to use an access database as a shared database on a remote website. I don't know if it is possible, but this is what i would like to do with this database: - Use it to run a database driven website - Maintain it via a client application and via the website. As i would like to maintain it both locally and remote via website forms written in ASP, I don't want to sync the information between the server and a client database. I...
1
1232
by: warezguy05 | last post by:
Hi I'm developing a database driven website (my first one..) but i've run into a problem. My vision: The website should contain a database of DJ's that have played SETS at EVENTS (or raves ..whatever you call them). Each of those sets should contain a downloadlink to an audiofile so the visitors of the website are able to listen the set at home. Every set consists out of a certain amount of TRACKS (id, artist, title, remixer)
0
8633
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8348
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8493
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7176
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2613
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1797
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1493
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.