Jump to content



Photo

Auto Generated Url'S

php mysql url

  • Please log in to reply
3 replies to this topic

#1 paulclark

paulclark

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 25 January 2012 - 12:39 AM

Although I wasn't expecting to find a book that would provide all the code and the detailed instructions on how to adapt it to construct a dynamic website that does everything I need it to, this book came incredibly close.

I am, however, at a dead end regarding perhaps the most crucial part of my grand puzzle.

How to have user submitted content automagically appear in the index and create a link to itself?

I created a signup page to become a user, and the login page that gets me (and me alone hopefully) to the data entry page where I can input the following to several tables on the database:

Artist, Album Title, Album Review, Rating, Several Fields for Links (Artist Website, Label Website, Other Reviews, eCommerce Sites).

When I click Submit it all goes up and the following appears at the top of the Reviews index:

Artist, Album Title
My First, Last, Date Submitted
Synopsis (First paragraph of review, which will always be two lines long)

I've figured out all the primary to foreign key links, joins Etc but I'm missing how submitting data can create a URL back to itself. I think that answer is in Chapter 19 but I'm just not seeing it.

Thanks, PC
  • 0

#2 paulclark

paulclark

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 26 January 2012 - 6:17 PM

OK I ended up taking a break and solved the problem in my head.

The missing ingredient was adding a self numbering ID to the virtual table I created from which I pull the data for each review.

Without that there was no way to create a unique URL
  • 0

#3 Larry

Larry

    Administrator/Writer

  • Administrators
  • 4,003 posts
  • LocationState College, PA (USA)

Posted 27 January 2012 - 10:05 AM

Sorry for not replying earlier, but kudos for figuring it out and thanks for sharing your solution. So much to be said for stepping away from the computer sometimes!
  • 0

#4 Marie

Marie

    Advanced Member

  • Members
  • PipPipPip
  • 121 posts
  • LocationToronto, Canada

Posted 16 May 2012 - 9:59 PM

What exactly do you mean by a self numbering ID - an auto incremental key?
  • 0