Python 2.7 Tutorial Pt 17

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

You could save the information to a database or even a simple text file. I don't know if Python would be the best language for this though. Many hosting companies seem to hate Python. It might be better for you to learn PHP or Java. I have tutorials on both that show you how to do what you want

derekbanas
Автор

@dawgp0und Use the POST method and then in your python code do this:
import cgi
formData = cgi.FieldStorage()
emailAdd = form["email"]

# All the form data is available by referencing the name you assigned it in your
html code

Does that Make sense?

derekbanas
Автор

@MultiComputerScience You're welcome

derekbanas
Автор

Did you get the code from my site. There is a link to it in thee description for this video

derekbanas
Автор

This is exactly what I was looking for. I'm wondering if there is a way to have a Python file to act as the server file in an AJAX html page. If so, how do you send data to the server (GET or POST methods?). Another beautiful tutorial. Thumbs Up!

dawgpund
Автор

@derekbanas Love the VIDEOs! One of the best channels and sites I've found yet! But I know you used a very simple database SQLite will you be creating a tutorial on Django a python framework connecting to maybe MySQL or PostgreSQL? To help use further understand how it all meshes and connects with one another? Would be GREAT! Again thanks! Subscribed and forever followed!

entrevu
Автор

How long did akeyou to master all these languages?

jirehguy
Автор

@derekbanas Sort of. How about on the client side, how I would I formulate the line that calls the python file and sends it the POST data? In addition, does it matter to include formData = cgi.FieldStorage() (trying to keep code as lean as possible) Thanks for your help. Very much appreciated.

dawgpund
Автор

I'm working on a project in which I have to transfer input from a GUI to a html file. How would I do that?

AmbiNicole
Автор

Yeah I took it from there. I even tested it in eclipse works fine. Prints all the html code and stuff. However when I put it in the htdocs folder in xampp and try to access it from localhost it just shows the python source code.

herp_derpingson
Автор

It just prints the source code on the screen what am I doing wrong? :(

herp_derpingson