Hello!

I'm new here, and also beginner with php programing. i'm just starting to learn the basics, and I mean very basics. :o

I have a little problem, what I want to fix on my homepage. the situation is the following: (photos.php)
http://shclass.fw.hu/demo.gif
This is the starting point.

Now, what I want to make is, everytime i click some link on 'navigation in photos' just under it included page should change with and the others should stay where they are!
Is is possible to manage? Please help me! :lol:

It would be great if someone could help!
Thanks :cheesy:

Hi Class

I will be able to help you but I need to know some things first.

1. Are you already familiar with making standard HTML web pages
2. What do you need the php programming language for (database, form process, dynamic results)

1. Are you already familiar with making standard HTML web
pages

Yeah, I can say i'm familiar with HTML, CCS, and JS, but the last one only to get script an then analize them, and manipulate them for my needs. Ohh...well and a bit of Flash animation in SWIFT. *if i remember the name rightly* And I'm a little bit now familiar with PHP, I allready installed some PHPs on my website and i have done some changes in them, but target of the changes were basicly visually.
http://silverhawkclass.fw.hu Well, if you wanna see my website.

2. What do you need the php programming language for (database, form process, dynamic results)

Why I need it, it would be much easier to hand my photos. I want to upload some photos to my website, but to make every time the whole website package. So i searching for easier ways. Well, there where some really cool gallery managers like Coppermine, but they are to big for me, and I actually don't want it that big. Hehhh....useless, even my forum is unused, but it was fun to install it. So I guess thats why I choice was PHP, and i saw some like these:
newreply.php?do=newreply&p=146543#
*which is at the moment in the asressbar written*
.....so just for my personal website.

I've searched for some tutorials in PHP to know a little bit more...... :o I found Ron's website, so I've done couple of those tutorials, so i'm not as dummy as before but still a dummy.

I'm happy that you can help. :cheesy:
And if i know right this can be done by 'querystring'..... :lol: *i'm on the way to be a perfect php programmer....hahha :lol: :p *

So you only need for a photo gallery? Something that will allow you to simply have photos in a directory and they will automatically appear on the appropriate page?

So you only need for a photo gallery? Something that will allow you to simply have photos in a directory and they will automatically appear on the appropriate page?

Well, that would be more attractive to me, but I think also mroe difficult to make. I thought about.....ohh have you seen my picture demonstrating the situation? if not then please go and see it!
But basicly I thought about, to open ech time when i'm browsing in the gallery not the whole page just some which will change. Thumbnail page and the photo-in-bigger page i will made my self, and then only just 'include' them on the page. *am i understandable?, my english is bad!* :o

Thanks :cheesy:

Aloha!

You don't need to help make the whole thing, it's also good if you know maybe a tutorial for it, or even maybe you have one.

Btw...is it necessary to have/know SQL?

Thanks...again! :mrgreen:

Well I still might not understand what you need. But are you using FrontPage or Dreamweaver. They have photo gallery tools that you can use. As far as mysql goes, you would only need that in rare cases for managing photos. Do you have an example of another site that might show what you need. Because I think so far your requirements have been a little confusing

-B

Well I still might not understand what you need. But are you using FrontPage or Dreamweaver. They have photo gallery tools that you can use. As far as mysql goes, you would only need that in rare cases for managing photos. Do you have an example of another site that might show what you need. Because I think so far your requirements have been a little confusing

-B

Ok.....i will search for an example website. And no, I'm not using any of those programs. *I tried, but they do not fit me* I use the oldschool way of doing things. I use Notepad and CoffeeCup, and now i got PHPEdit, you know to make php's easier that notepad does. :cool:

Okay.....found one! But actually i don't know if it's meaning the same what i want?!
Go and see it: Here!
I don't understand this php code? is this 'querystring'-ing? :confused:

Check out hotscripts.com, they might have something that fits your needs.

Yeah, but myself i don't know what I'm searching for, at least not what this is called what i want! :o

Can someone explain me how can i use this: :o (or how it works?!)

<?php
$id = $_GET['id'];
switch($id) {
default:
include('main.htm');
break; case "wow":
include('wow.htm');
break; case "tutorials":
include('tuts.htm');
break; case "files":
include('downloads.htm');
break; case "aboutme":
include('me.htm');
}
?>

THX

A more standard structure would be

<?php 
$id = $_GET['id'];
 
switch($id) { 
     case "wow": 
          include('wow.htm'); 
          break; 
     case "tutorials": 
          include('tuts.htm'); 
          break; 
     case "files": 
          include('downloads.htm'); 
          break; 
     case "aboutme": 
          include('me.htm'); 
          break;
     default: 
          include('main.htm'); 
} 
?>

Here's what it means. -Its an alternative to an if statement. By saying Switch, we are evaluating the $id variable. Now think of every case as a possible answer. The first case means, if $id == wow, then include "wow.htm" the break means get out of the switch statement and dont evaluate anymore cases because some times (not this time) there could be more than one matches. I dont know why your default was at the beginning but you should put it at the end. Thats like a special case. It means if no other case matched, then do this. This being whatevers below the default. You may or may not need a default though. If you're ok with the posibility of $id matching nothing, and nothing hapening because of that, then you dont need the default

-B

Thank for the xplanation! :idea: Now, i know how to handle it! *damn....and sorry if these thing are abvious to almost everyone*

Have a nice day.... :D

We all did the same learning curve

We all did the same learning curve

Yeah.....everybody must start somewhere!

Do you know some good books, or ways how could I learn PHP + MySQL? I've some books...maybe you would know better which one is good, or betten than others. If you can, recommend me some books, please....

Have a nice day....

I would start with the online tutorials, they're more practical and application orientated. Books are good too but every programming book ALWAYS uses 2/3ths of the book to teach about variables, arrays, statements and so on. And all programming languages are pretty much the same in this area. - What I mean is if you know one, then learning your second is very easy so there's no sense in buying a book that will teach you the same theoretical stuff.

Here are some solid websites for examples in php, mysql

http://www.zend.com/zend/tut/
http://www.w3schools.com
http://www.mt-dev.com/

As for as books go I have been extremely satisfied with the stuff WROX produces. All three of my PHP books were published by them and my ASP book was as well. And my C++ book. I'm sure I've got more. But I certainly think WROX is the way to go.

Thanks for you two for the tips and hints. :cheesy:

Ehhh...sorry that I have to bother you again! *is bother written like that...damn, my english is bad :o * Now I created the id in the abject php, and icluded the php code #1! I have in this file a navigation that uses CCS file to get where the link shall go and how and so on. But I don't know how to make that it shall change the id in adressbar? I try to think logicaly, i tried thing like this to add to the ccs file:
id="bla"
but no!
my instrict says i have to make something like a php here as well, so how can i ad a php code to the ccs?

#1

<?php 
$id = $_GET['id']; 

switch($id) { 
     case "bla": 
          include('bla.html'); 
          break; 
     default: 
          include('start.html'); 
} 
?>

Sorry.....I'm i stupid or not. Finally I got it....with my little sense of logic.
i just ad as url: 'bla.php?id=bla'! :idea: :cheesy:

But........Now I'm thinking of adding another variable to it. Language, so it shall change the language easily, but how?

<?php 
$id = $_GET['id'];
$lg = $_GET['lg']; 

switch($lg){
...
}

switch($id) { 
     case "one": 
          include('one.html'); 
          break; 
     case "two": 
          include('two.html'); 
          break; 
     case "three": 
          include('three'); 
          break; 
     default: 
          include('index.html'); 
} 
?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.