|
|
JohnWalsh
new user
Reg'd: Sun
Posts: 2
|
PHP advice needed - how do I "assemble" a page URL link
Sat Nov 03 2007 02:10 PM
|
|
|
Can you enlighten me. Playing with building a web site which will have access by friends and colleagues - after an "intro" of just 8 simple pages (usual Home, WHO, WHAT, CONTACT etc, there will be HUNDREDS of PROJECT pages (or more) which I need each person to be able to access using THEIR ASSIGNED reference numbers, which are in TWO parts, namely a project AREA (3 numeric), and a project ID (8 alphanumeric) . The PAGE they will want to read will be for THEM only, nobody else would be interested to view the contents, and indeed would not be allowed to. On the web site storage (hosted) there will be a FOLDER corresponding to the AREA in the format "AREA401" (where 401 is entered by the visitor), and inside the folder AREA401 there will be another folder for a specific project for example the reference "DJA32242" and the actual page file name to be targeted will be called "Datasheet1.html".
I need on the FIRST PAGE (the Home page) to be able to capture an INPUT references (such as 401 and DJA32242) and I need a PHP or Javascript to be able to construct a URL ahref which looks like this
www.mywebsite.co.uk/htdocs/AREA401/DJA32242/datasheet1.html
You can see that 401 and DJA32242 within teh above are collected via INPUT whereas the rest of the URL is fixed/pre-formated.
The net result needs to be that the code then opens the correct project page file, or returns an error indicating the file cannot be found.
SO if they enter a Reference which doesnt exist or is incorrect they will just STAY on the home page - if the Reference is correct then they will be taken directly to the right Project Page, from where the only other place they will need is just BACK to the Home Page.
The files for the site will contain folders / file with the exact same file name as the two References.
So what HTML and PHP/javascript code do I need to create to be able to
A) position 2 entry fields to capture the two References (AREA and PROJECT ID) B) construct the full URL address path C) send the viewer to that Page address D) STAY and show an error if the link fails
I have been quite successful in building the site I have in mind using Serif WebPlus 10 tools which I can recommend for novices such as myself - but getting through quite simple navigation features such as this seem not easily covered or found without becomming a fully fledged script progammer - which I don't have time to do.
I am willing to pay any helpful forum member (up to £100 without thinking - this seems the sort of thing that would take a script programmer 30minutes to code). Otherwise a ny general help or pointers gratefully received - many thanks
John
|
|
|
|
PHP advice needed - how do I "assemble" a page URL link
|
JohnWalsh
|
Sat Nov 03 2007 02:10 PM
|
|
|