Hello world, I am stumped, someone please help me with some code.

I have created a purl, example: www.mydomain.com/purl
However, I want people to first go to www.mydomain.com.
On the homepage, I want people to enter their phonenumber (which is the purl) in a textbox.

I am looking for a code that once submit button is clicked, will take the value (phonenumber) from the text box and check with my database if it exists...if it does...add that same value behind the url (http://mydomain.com/purl) and load the page.

if not then display an error message.

This is a wedding invitation site, so my family members will be entering their phone number to see their personalized wedding info.

either use isset($_POST"somevar
or post response to a different page then use database routine to
check the number
using if else uyou can direct to the correct page

Thank you for the quick reply.
Im not that experienced with PHP so im not too sure how to use the isset($_POST"somevar

i will try to do the second way you mentioned. Posting the response to another page, that will run the if else against the database and forward to the actual purl if it is a match or to a try again page if it is not.

I am reluctant to do this way though because it means loading another page which users may see a flicker. i would perfer to do it correctly, which i think the isset way is. but i do not know how to use that method, and am desperate to finish it quick. If you can elaborate on the ISSET please do.

Anyhow, thank you once again for the quick response. And now I shall try it out.

That would be possible using Purlem.
I created an example here: http://purlsvnpage.com

I added a contact to the campaign named "Matt Jones". Matt' phone number is "5555555555"

If you type that phone number into the field provided (I know it's not very pretty- just threw it together quickly for this demo), you will be taken to Matt's page.

I can help setup a campaign like this for you. There would be no additional costs on top of your Purlem subscription for something like this.

Hope that helps..
Marty

Hey, so i got it to work...

I ended up making the form on www.mydomain.com to post the phone number and set the action to another php page which had a header function that concatanated the url with the value grabed from the POST from the form.

This then loads the purl. I already had a validation on the purl so if someone entered the wrong phonenumber (not in database) it loads the error page instead which is basically the signin page but with error message.

the ISSET function is probably better because less page loads, but in this day and era, it is not a big deal since internet connections are pretty good.

Thank you mthomas9 but i will not be needing purlem since i am able to build purls from ground up.

Thank you world

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.