- This topic is empty.
-
AuthorPosts
-
November 27, 2009 at 4:12 pm #26951benryersonParticipant
I’m a photographer who designs, develops and maintains his own web site. For years I’ve been using the following bit of code to redirect my clients from a single-field form to the index file in directory containing their photo proofs. I’ve been using .ASP to do this.
Here’s a link to my site: http://www.ryersonphotography.comThe form in question is on the home page in the Client Login section in the bottom right.
Here’s the form code:
Code:And here’s the code for the showproofs.asp redirect:
Code:<%response.redirect("/clients/" & request("sessionid"))%>Basically, the "sessionid" refers to the name of a folder in the "clients" directory. My client enters their session id (usually their name) in the form and submits it, the form calls the "showproofs.asp" file and the redirect locates the index.html file within the directory referenced in the form and it displays the page in the browser. Simple and easy. I don’t need it to be super-secure, just not instantly accessible to anyone who browses to my site.
What I love about it is that, much like the PHP class ImgBrowz0r, there is no additional coding each time I want to set up a new gallery. I already have an automated process for creating the galleries and once I create a new folder in the "clients" directory, I’m done. The name of that new folder becomes the "sessionid".
Here’s my problem: I’m switching to a hosting service that does not run .ASP on their servers. Fine. No big deal. What I want is another way to do this that doesn’t require .ASP. I would prefer something like jQuery or PHP but I’m not an experienced enough developer to get either of those to do what I want without help. Any suggestions are welcome.
Thanks in advance!
BenNovember 27, 2009 at 6:50 pm #67133AshtonSandersParticipantSure,
ASP:
Code:<%response.redirect("/clients/" & request("sessionid"))%>PHP:
Code:header("location: http://domainname.com/clients/" . $_POST('sessionid')); ?>Is that the only ASP you use in that system?
December 2, 2009 at 9:28 am #67392benryersonParticipantThank you!
It’s the last bit of ASP I use. I used to use ASP for image galleries but have since upgraded to a PHP class for that.As I am not a developer, I’m gonna play the ignorance card and ask how to implement your PHP solution for the redirect. Should it be it’s own separate file (that’s currently what I’m doing with the ASP) or should it be placed inside the page containing the form?
Thanks again for the assistance!
BenDecember 2, 2009 at 1:18 pm #67404AshtonSandersParticipantNo Problem.
It doesn’t matter too much how you do it.
For simplicity, you might as well put it in the page that sends that the form redirects to.
When you click "submit" on your form, the form is directed to a page. That page *does something* and after that code, put the PHP redirect…
does that make sense?
December 2, 2009 at 3:03 pm #67407benryersonParticipantIt makes perfect sense and it’s now up and running.
Thanks so much for your help; it is greatly appreciated.
Cheers!
BenDecember 2, 2009 at 3:16 pm #67408AshtonSandersParticipantExcellent. And you call yourself a novice. ;)
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.