How to make a form verify from a database

I need to create a page that will have a person enter their
membership number and if they are in our database they will receive
a 10% discount on their items ordered.
I set up a database and my webpage with a textfield for them
to enter their member number. But now sure how or what needs to be
done to the webpage to connect to the database and return a true
statement so the person gets a discount if they are a member.
Also, is there a script that would calculate a 10% discount?

Ajax (Javascript) would have an edge over PHP in regards to responsiveness. The best solution might combine all three methods (PHP, Javascript, HTML).
Are the responses going to be stored in a database? If so then you can also use the database to store the questions, complete with form fields.
One big difference between javascript and PHP is that PHP does nothing until you either open a new page or hit submit, and then it runs in a linear fashion until it reaches the end of the script. Javascript, on the other hand, can respond to other "events" that take place, such as when the user clicks away from a form field. With the advent of html5, HTML now has a little of the responsiveness of javascript.
PHP is the tool you use for processing form data and interacting with the database, if each form response is followed by a complete PHP processing cycle, the form will seem sluggish to the user. There are two solutions to this:
Have the user respond to a group of questions, then hit submit. The occasional lag for page reload won't bother the user.
Use AJAX to interact with the PHP form processing behind the scenes.
So yes, you can have one page that responds and changes depending on user input. PHP, javascript and HTML5/CSS3 can all be part of this. The specific way you build your solution will depend on your specific form progress and what technologies you are most comfortable with. For instance, my strong case is PHP, so I let it do as much of the work as possible, but I know coders who do much of what I would do in PHP with javascript, because that's what they are most comfortable using.
Any resources on how I might be able to do this via PHP?
PHP Solutions second edition by David Powers
Programming PHP by Lerdorf, Tatrow and MacIntypre

Similar Messages

  • Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the rows? Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
    Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    The Oracle documentation has a good overview of the options available
    Generating XML Data from the Database
    Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
    You can also find some information in XML DB FAQ

  • How to edit task form generated from human task (.jspx)???

    I created simple SOA application with simple Human task (from this tutorial http://redstack.wordpress.com/2010/01/08/human-workflow-in-11g/ but it doesnt matter) in JDeveloper. Then I generated standard form from human task (Human task -> Auto-Generate Task Form).
    The question is, how to make own form? Not the generated default, but with my own logic...That form is jspx, not jsp, and thats the main problem, in this JDeveloper everything is a bit complicated.
    I tried delete whole generated content, and just import my created file.jsp into jspx like below, but without result. How to import jsp into jspx? I dont want to completely rewrite my existing jsp into jspx and copy it over default...
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:trh="http://myfaces.apache.org/trinidad/html"
    xmlns:wf="http://xmlns.oracle.com/bpel/workflow/workflow-taglib.tld"
    xmlns:wlc="http://xmlns.oracle.com/bpel/workflow/worklist">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    *<jsp:directive.include file="file.jsp"/>*
    </jsp:root>
    Edited by: [email protected] on 8.6.2010 9:47
    Edited by: [email protected] on 8.6.2010 9:47
    Edited by: [email protected] on 8.6.2010 9:48

    Hi,
    Try
    FacesContext context = FacesContext.getCurrentInstance();
    NavigationHandler handler = context.getApplication().getNavigationHandler();
    handler.handleNavigation(context, null, outcome);
    context.renderResponse();Regards,
    ~ Simon

  • How to make a jar file from a java file?

    how to make a jar file from a java file, is there any one tht can help me thank you;

    You can study this.
    http://java.sun.com/docs/books/tutorial/jar/basics/index.html

  • How to make a form for input in web interface builder

    Hi expert:
        How to make a form for input in web interface builder?I have already used it to do PS planning, but I don't know how to  draw lines and checkboxes . Thanks in advance.
    Allen

    WAD:
    Open the WAD and create a new template. On the left hand navigation you will have several Web Items available. Under 'Standard' you have 'Analysis' item. Pull that into your template to the right. Under the Properties tab you need to pick the query [form/layout] that you have built in Query Designer.
    You will also find other items such as Button group, Checkbox, drop down, list box etc available. Pick and drag into the template whatever it is you require. Lets say you want a button. Under the Properties tab select the 'Command' that you require. You could use standard commands that are available there. You could also define functions and commands that you require.
    Query Designer:
    Open the QD and drag the characteristics and key figures that you require into the rows and columns of the QD. You would need to specify restrictions under the Filter tab of the QD based on the granularity of data that you require. You would need to remember that the key figures need to be made Input Ready [do this by clicking on KF and on the planning tab select "change by user and planning functions"].
    This shouldgive you a start. After you've explored it yourself a bit we can discuss further and I can certainly provide you additional details/material on these areas.
    Srikant

  • How to upload the invocie verify from excel file?

    How to upload the invocie verify from excel file?
    there is more items requied to input.
    refer to MIR7
    thanks

    How to upload the invocie verify from excel file?
    there is more items requied to input.
    refer to MIR7
    thanks

  • How to make a conference call from an iPhone

    How to make a conference call from an iPhone

    http://manuals.info.apple.com/en_US/iphone_user_guide.pdf user manual

  • How to find the form name  from VA02 T.code

    how to find the form name  from VA02 T.code

    Hi Rajyam,
    I guess you are looking out for the formname which prints sales related documents.
    If this is what you want,then go to the T-code NACE and select the option K1Sales activities and click on the Output Types button on the top.The new window has all the types of Output types listed.Select the most appropriate and double click on the Processing routines button in the left side screen.
    The new window lists the program names and the forms associated with that output type.
    In case you have any further clarifications,do let me know.
    Regards,
    Puneet Jhari.

  • Hi can anyone tell me how to make the forms url short to the end user

    Hi,
    Im using oracle forms 11gR2 and everything is working fine, but my question in how to make the forms url short to the end user.
    For example my forms url is  " http://localhost:9001/forms/frmservlet "  now i want to modify this url as   "myweb.gov.ae"
    can anybody suggest me the possibilities to change to default forms url to our own url as mentioned in the above example.
    Thanks & Regards,
    Hari

    You would have to either -
    * edit the code pointed to by the new action attribute to
    include the form
    processing and email generation, or
    * edit the form processing script to also include the insert
    record and
    check user name scripting
    The former is probably the better procedure, since I suppose
    you'd want to
    do the check user name before sending the email.
    Unfortunately, this means
    you will have to get your hands into the code, or hire
    someone to do it for
    you.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "ducati1" <[email protected]> wrote in
    message
    news:gkriis$et6$[email protected]..
    > Hi guys.
    > I have a page with a form on it here.
    >
    http://www.thechallenge.net.au/superredemption.php
    > I want the data placed in the textfields within the form
    to come to me in
    > an
    > email upon submission.
    > Now normally I would action the form to use this page
    here
    >
    http://www.thechallenge.net.au/Redemptionform.txt
    > But because the action of the form is now <?php echo
    $editFormAction; ?>
    > due
    > to an insert record and check user name server behavior
    I cannot use my
    > normal
    > method.
    > Can anyone tell me how I can get around this problem?
    >

  • How to make PDF forms work in DreamWeaver

    How to make PDF forms work in Dreamweaver

    Look at DW's starter pages called "liquid" (FILE | New > Blank Page > "2 column, liquid" etc., or Google "liquid layouts".

  • How to disable certain form fields from a calculation with a check mark fields.

    How to disable certain form fields from a calculation with a check mark fields.
    In Canada we have to taxes
    I create a form that calculate them to a total
    I need to be able to turn off any of those to taxes to participate to the calculation and their visibile field should become 0
    I was thinking using a checkbox (when checkbox is on (Yes) the tax is calculated, Not ticked (Off) the tax is not calculated and the visible field should show 0 or nothing....
    I really need help on this one — I’m a complete newbie....
    Remark that the second tax is calculated on the sum of what the first tax add (first tax is pan-canadian tax (all provinces).
    The second tax is never use alone (Quebec only (on top of the Canadian one)
    Sometime for outside Canada sell - No tax at all is calculated....
    What should I do?

    I want to tank you to help, really appreciate —>
    This is the code and order... I just trow the checkbox in there (they have, so far, no purpose...)
    The code use is
    var a = this.getField("pricehorstx");
    event.value = Math.round (a.value * 7.25) / 100
    I guess -If the checkBox are check - The tax should be calculate — If “Off” the tax should be not calculated and PriceHST and /or PriceQST should show zero or be empty — The HST is always calculated in Canada, but the QST is added only in Quebec.
    I need to turn both to Zero for international sale.
    Message was edited by: Chacapamac

  • How to make a ARCH package from local folder?

    hello ARCH lovers
    I can't seem to figure out how to make a installable
    package from a folder on my desktop?
    Coming from Slackware; the procedure would be simple enough just issuing
    "makepkg /root/pkgname.txz"
    Now; how would I do the same in ARCH?
    I know about PKGBUILD, etc but there is no source or any url's
    I just need to make it into a .pkg.tar.xz
    The package is my "kernel-live-kit" for both x86 and x86_64 versions of arch
    enabling one to remaster there existing install into a livecd/usb, etc
    The kernel itself is kernel26-zen from AUR
    http://aur.archlinux.org/packages.php?ID=30330
    however; mine is quite different and also includes all components to make the livecd using modified linux-live-6.3.0
    scripts and special stuff
    The pkg includes a premade kernel with modules and full kernel source
    The resulting live media is similar to my nFluxOS builds
    http://multidistro.com/
    As I will be releasing the new four horsemen of nFluxOS today; I also made 4 Kernel pkg's for the arch and slack versions
    Those will be for x86/x86_64 versions for both arch and slackware
    I did this in lieu of creating a quartet of x86_64 versions of nFluxOS; as that would up the number of versions to 8
    and I would then have to maintain 8 distro's instead of 4.
    I made a testing version of ARCH x86_64 live
    http://www.linuxquestions.org/questions … ost4017796
    so, I really need to make the ARCH x86 and x86_64 kernel kits into installable pkg's because there are many symlinks that would get corrupted if I just tarred it and then the end user untars it and copies it somewhere it would mess up the symlinks.
    as I said, in slackware I do makepkg and it creates a script named "doinst.sh" that makes all the symlinks, etc
    so, any help appreciated!
    thanks

    You can read a simple introduction to using the ABS here.
    By the way, it's not hard. Out of all the distributions I've used, Arch Linux is the only one I've figured out how to make packages for.

  • How to pay for forms central from serbia

    how to pay for forms central from serbia

    Hi Uma,
    One way of doing it is by incorporating this computation in the formula which calculates your basic salary.
    If your employee's hire date (EMP_HIRE_DATE - database item) is after your Payroll period start date (PAY_PROC_PERIOD_START_DATE), then currently the pro-ration calculation is performed.
    You'll have to insert another piece of control in this part which will check if the days between the Payroll period start date and emp hire date are holidays (I assume you have your holidays stored somewhere in the system) or not and adjust the "start date" used for the pro-ration with every holiday found between EMP_HIRE_DATE and PAY_PROC_PERIOD_START_DATE.
    HTH.
    Rajen.

  • How to get the selection parameters from logical database into one of the t

    Hi Sap ABAP Champians,
    How to get the selection parameters from logical database into one of the tab in the tabstrip selection-screen.
    Please help me for this
    Thanks
    Basu

    Hi
    Thanks, that will work, but then I'll have to insert code into all my reports.
    I can see that "Application Server Control Console" is able to rerun a report.
    This must mean that the Report Server has access to the runtime parameters.
    But how?
    Cheers
    Nils Peter

  • How to install Pro*C apart from the database?

    I would like to know how one could Pro*C apart from the database. Thanks.

    Just unzip all Instant Client zip files in the same directory, they all have "instantclient_11_2" as first path element,
    so everything will end up in the right place in this directory.
    If your Instant Client directory has a different name, unzip the package somewhere and move all files and
    directories in it to your instant client directory.
    Yours,
    Laurenz Albe

Maybe you are looking for

  • How to round numbers to the nearest .25

    I would like to enter a number in one field and have it rounded to the nearest .25 in another column - (whether that's rounding up or down) Example: Actual Size Adjusted Size 7.21435 7.25 Any help would be appreciated. Thanks!

  • Not able to send or receive SMS messages on iMessage on mac

    When I first updated to Yosemite the new SMS feature on iMessage was working. I had to replace my home button and screen on my iPhone 5s and after that it stopped working. I am not sure if having that repair done on my phone has anything to do with m

  • Deleted coremidi.framework & CAN'T OPEN MUSIC PROGRAM.  please help!

    I use Ableton LIVE to make music. I don't know what "coremidi".framework is, but the coremidi.framework folder always bounces in my dock.  I recently downloaded and installed my first plugin (Waves Tune) which wasn't working, so I suspected this Core

  • ICal and CalDAV: Added items in sunbird do not appear in iCal

    Hello, I hope the question fits the forum and has not yet been answered. Sorry if it is the case. Anyway, here is my problem. I have this CalDAV account that I want to use both on my mac using iCal and at the office using sunbird (computer on linux).

  • Sales order form issues

    Hi, Sales order form takes lots of time to get closed on r12.0.4 vison instance why? Regards