Jump to content


Photo

Simple PHP Problem I think ??!


  • Please log in to reply
7 replies to this topic

#1 rskidorz

rskidorz
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 04 September 2006 - 07:19 PM

Hi there,

I';m new to PHP/MySQL and have started learning recently for university.  I am doing OK however I have recently approached a problem. 
I am following a tutorial from a book where a SQL database maintains the details of artists and albums.  The initial page "index.php" contains a list of the current artists within the database and the opportunity to add a new artist to the list with a form at the bottom of the page.  It is possible to view the artists albums by clicking on the view buttton next to the artist which will direct to "artist.php" showing the artist name and album title if applicable.  From this page it is also possible to edit artist name through "edit_artist.php" or to add an album.  All works OK until you try to add a second album for an artist, or try to Edit after an album already exists for the artist.  I figure the problem is that once an album is added the Artist ID field is not being passed on to edit_artist.php or to the form when atempting to add a new CD.
I appreciate the solution is probably quite simple and I must have overlooked a minor detail.
I enclose all files concerned and would appreciate any help as this is really bugging me ! 


#2 rskidorz

rskidorz
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 04 September 2006 - 07:24 PM

For some reason I can't attach the PHP files... anyone got any ideas ?

#3 rskidorz

rskidorz
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 04 September 2006 - 07:35 PM

Got them hosted here :

http://ben.iteachers...files/index.php
http://ben.iteachers...iles/artist.php
http://ben.iteachers...edit_artist.php

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 04 September 2006 - 10:08 PM

Rename those files so they have a phps extension, that way we sould be able to see the source code of those files. Or save them as normal textfiles. Otherwise we cant see no source code, cant download them as it just downloads them as a blank file.

#5 rskidorz

rskidorz
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 04 September 2006 - 11:42 PM

Hi there ,

Got those properly uploaded now :

http://www.5ilby.karoo.net/index.phps
http://www.5ilby.karoo.net/artist.phps
http://www.5ilby.kar...dit_artist.phps

Any ideas ?


#6 rskidorz

rskidorz
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 05 September 2006 - 12:36 PM

Is the solution to this simple ?

#7 rskidorz

rskidorz
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 06 September 2006 - 08:37 AM

Sorry to be a pain but does anyone know how to do this ?

#8 rskidorz

rskidorz
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 09 September 2006 - 11:10 PM

I know it looks like nagging but I just wondered if anyone knew a solution to this problem please?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users