well since there are many flat file operations associated with php and mysql on files like these where would i start ?
i wanted something simpler to work on ... i was looking for a simple registration form / script then a login form /script to see a few php mysql operations ... the only thing i saw was this link http://phpeasystep.com/phptu/6.html which is a tutorial on a login form /script but lacks a registration form /script maybe i should try to design a registration form /script for that table i cant think of anything better ...
Creating a Form Insert Into - Adding Data from a Form http://php.about.com/od/phpbasics/ss/mysql_files.htm
Maybe you should try something more basic first - like the client-server model. Like the document object model. Like HTML and CSS.
i am a bit lost .. a home page registration link registration page registration form ... login link login page login form ... a member only page link ..a member only page ... where a streaming video describes how icecreams are made ... and finally order ice cream page . .
Because you're trying to create a website before you've learned the things you need to know in order to be able to create a page. Learn them in order.
yea thanks .i am trying to learn them in order .. this is the sort of stuff i was told to build .. but failed the first time .. this is my 4rth try on the same subject ...
You don't start by building, you start by studying. And you study, in this order, the client-server model, the document object model, HTML and CSS. Learn one before starting to study the next.
edit ... The message you have entered is too short. Please lengthen your message to at least 10 characters.
No, it would retrieve individual prices from the table, multiply each by the quantity for that item, then add the amounts. You never store a value you can calculate from existing data, except possibly in an invoice table. A description of the program in words ia a lot more helpful to answer your questions than pretty pictures and code snippets not related to the question. As far as the variable name, it's whatever the programmer decides to call it - $a, $total and $total_amount_of_all_items_sold_on_this_invoice are all legal variable names, although if the name is really long it slows the processor down and it can make reading and debugging the code a nightmare. Especially if you have 2 variables named $total_amount_of_all_items_sold_on_this_invoice and $total_amount_of_all_items_sold_on_the_invoice or some such nonsense. The general rule used in computer programming is to make the name meaningful and as long as it needs to be but no longer. So the above could be $invoice_total and $invoice_total_other, for example. (Or even $invTotal and $invTotalOther. Use mixed case to make it easier to read if you don't like underlines.) (And it's "Your Total" - you're is a contraction of you are.)
thats what i am really trying to understand ... all i know is that the script i am looking for works like a form ... in an html page .. but i am not really sure how the code works inside the script .. i was thinking of something that takes a variable ( ice cream ) with a fixed price multiplies it with a few drop down menu option of 1 2 3 4 5 .. and displays the total sum in the page ....
In order to do it from a database you have to submit the form to the server, where the database is located. The script on the server gets the price and send it back to the browser, where the rest of the browser script calculates the price and displays it. (The server and browser script, say PHP and Javascript) may be in the same file (or they may be in separate files), but they aren't running at the same time. The server script runs (on the server), then sends the browser script to the browser to display. To talk back and forth between them you use AJAX, a technique that allows the browser to send data to the server and get data back. (Or you submit the form and the server script creates a new browser page with the total or whatever you're calculating, and sends that to the browser. To the user it looks as if the browser went to a different page.) You can't start by looking at a site, then looking at the script and hope to understand it. You start by learning programming and the server-side and client-side (browser) languages, and how the client and server interact. THEN you look at sites and scripts. You're reading a Russian novel before you learned Russian or the Cyrillic alphabet. Some of it looks familiar, but you have no hope of understanding any of it until you learn the language and the alphabet.
i dont want to use javascript ... i only want php and mysql could you explain this program in a bit more simpler terms ... i only have one type of icecream .. one icecream .. one fixed price .... drop down menu with 5 options ...the total sum ice cream type one with fxed price x 1 (drop down menu ) .. the total sum ice cream type one with fxed price x 2 (drop down menu ) .. the total sum ice cream type one with fxed price x 3 (drop down menu ) .. the total sum ice cream type one with fxed price x 4 (drop down menu ) .. the total sum ice cream type one with fxed price x 5 (drop down menu ) .. the total sum 50 x 1 50 x 2 50 x 3 50 x 4 50 x 5 php program multiplication by a constant ?
At the very least, you'll need HTML. PHP and SQL (MySQL is a program, not a language) don't display on the user's screen. echo $_POST['quantity'] * 0.5; (Work in dollars, not cents.) Of course you have to have an HTML <form> with a dropdown (named quantity in this case) and a submit button.
this is the kind of program i am looking for i think .... the ice cream price .. staying fixed ... then i need to create a drop down value from 1 to 5 ... which multiplies the constant value of ice cream price for every drop and submit i have never done this before ... What we are trying to do in the above html page is that we have created a HTML FORM that is going to POST (send) data to the PHP file table_results.php this file will be called by the web-server and processed after processing it will be sent to the browser. The PHP global array $_POST['variable name'] Value from HTML drop down menu into php variable? value from html drop down menu into php variable ? <!DOCTYPE html> <html> <body> <form action="processicecreams.php"> <select name="icecream"> <option value="one">1</option> <option value="two">2</option> <option value="three">3</option> <option value="four">4</option> <option value="five">5</option> </select> </form> </body> </html> i cant understand a variable value or a variable name here the html form feild is a slut to deal with i am trying to find a variable name and variable value variable name .. variable value in a form ... variable name is the icecream variable value is the 1 2 3 4 5 i am trying to send a variable name $_POST['variable name'] to the php script in the form action ... ok
$_POST['icecream'] ok begining of a php script called processicecream.php this script should be able to multiply the variable value ( 1 2 3 4 5 ) to the ice cream fixed price ... and display the total
You think, but you think wrong. What you're looking for is instant understanding of something that takes months to begin to get a handle on. If you could read the code you'd see that it's full of errors. That's not what the code says. HTML isn't a programming language, so you won't find any variables (or any other programming things) in it. OK, then you'll have to invent your own web, because the one everyone else uses doesn't send $_POST['variable name'] to the php script in the form action, it has named elements in the form, and the form has an action, unlike the one in the example you gave. Since you don't understand programming, or how the client interacts with the server, none of this makes sense to you - and it won't until you put all this stuff away and study how it all works. You don't look at code until you know all the things you're asking here, and you learn them by studying books (or the content of well-written websites), not by looking at code.
You're not there yet. Start with Algorithms + Data Structures.pdf Don't just skim it, study it. You should be done with it by spring.