Unknown Technologies for Web Forms - php

I am trying to get to grips with various forms of web design and build. I have looked around and still cannot get a useful answer on what technology is best to create a Dynamic Submission form (that doesn't look like crap).
I want to build a sumitable form that is aesthetically pleasing. I have planned and sorted out that I will use PHP and AJAX so it can be interactive but I am lost on what technology to use to actually code/script the design of the form. If anyone can help it would be greatly appreciated, thanks in advance!
If anyone who reads this uses Virgin Media as their internet provider and they use their card details form online, that is my ultimate goal to make the form similar too (with different questions and submission details, but that isn't important). The look is what I am after.

you are on the right track actually.
for aesthetics, you should research more about designing in HTML/CSS
JS is used for the dynamic user interface
PHP and AJAX are all that's needed for a dynamic form submission
google is your friend. go ask him.
other than that, it's up to your imagination and originality how you implement it.

you would need to use html and css to actually build the form.
Javascript to possibly validate the form on the persons browser (client side)
php would submit and send the form.
If you like the look of the virgin media form you can find out how it was done by using developer tools on chrome (f12 on a windows machine, cmd, alt and I on a mac) or firebug pluign on firefox. Others are available but these are two of the best. This wll show you the html mark up the css and how it all works.

Here you have some examples of interactive forms: http://www.catswhocode.com/blog/10-jquery-tutorials-for-working-with-html-forms

Your best bet will be with ASP.NET.
Its easy to set up and the software is easy to use and is free.
You should use Microsoft web developer express.
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-web-developer-express
You will have the choice to code in c# or visual basic , c# will be the beter choice.
ASP.net is the new generation of website development.

Related

show a webpage as showdialog

I am a C# Desktop Application developer and I am making a web application in PHP
In C# I use ShowDialog to display a form, I want to know how can I do same in PHP.
any suggestions.
There are many ways to achieve this. You can create a DIV element and operate this with JavaScript, so this could be for example like modal form.
You can also open a small window by JavaScript and use this as a form -- this however is in fact another browser window.
Your question has in fact nothing common with PHP.
EDIT
If you choose to use JQuery, a JavaScript library, there is nice UI framwework. You might be interested in this.

Want my formated DIV to be converted to PDF and sent through email on a single click. Is it possible?

I have a PHP page powered by jQuery. A singel page has four steps, controlled by jQuery.
In diffrent steps, user selects two Images from two galleries (step 1 & 2), fromats a table by arranging divs inbetween (setp 3) then filling a form (step 4).
I want: when user clicks "Finish" on step 4. All the above information be converted to PDF and emailed to the provided email address.
Please suggest me idea, tool, plugin or code to do so!
The last time that I tried to auto-generate PDFs as you mentioned, I used a php library called fpdf. As I recall, it was difficult and cumbersome. My lack of knowledge/experience/patience definetly made me not have much fun working with it. Give it a shot and see if looks like it is feasible for you. The site has some getting started examples, and a quick Google search should yield some examples too. URL: http://www.fpdf.org/
I just stumbled across another library that looks promising: http://code.google.com/p/dompdf/ I have not used it, but, if I need to do this again in the future, I would try this before going back to fpdf.
I don't know of any javascript/jQuery plugins that can generate a PDF, so I think you are stuck with PHP in this scenario.
Hope that helps a bit!
EDIT: The email part is simple, I really like Swift Mailer: http://swiftmailer.org. It is simple to use, lots of examples, and supports a variety of options, like, attachments. Also handles the encoding issues that generally plague emails sent directly from php mail().
One more thing, if you are not too far into development, take a look at using Kohana as a php framework. It's light and easily extensible. They follow decent coding standards, and have an active open source community. Plus, there is a module for SwiftMailer that almost sends the mail for you-Not really...but I think you get the point. ;)
Have a look at http://andreasgal.github.com/pdf.js/

Xhtml instead of Php?

I want to develop a site that will allow be to publish information to users, and give them and opportunity to subscribe to a mailing list so they can be updated each time I make a change to the site.
*Add new information, etc.
I also would like for the users to be able to add comments about reviews posted, and give me suggestions...Things that will encourage user interaction
I understand that this is possible with php...
But I do not know php, and to learn and test it I apparently need a domain to begin with...etc.
Is it possible that I use Xhtml/Html to get the same results?
--
I know I can use the
Mail
but that would also leave my email open to spam...Any suggestions?
And I do apologize if this question has been posted before, I did some research and found no such thing.
All helpful responses are appreciated.
XHTML and HTML are essentially the same thing, just xhtml is based on an xml standard (thats where the x comes from), therefore being a bit more stricter.
HTML/XHTML is generally used for structure of your webpage, where as PHP is a server based language, meaning it works behind the scenes.
You could use html, but it'd be hideously complex to make, so i'd say you'd be better of biting the bullet and making a start on your first php app:) Don't worry it's very easy to get your head around. You do not need a domain to get started with the development, simply install WAMP (for windows), or MAMP (if your apple freak like me), these programs act as self contained mini servers, very useful for development!
Then i'd suggest trying it all out using html for starters, just so you get used to the WAMP/MAMP sever, before heading over to http://devzone.zend.com/article/627 for a brilliant set of tutorials on PHP!
EDIT: Another poster mentioned wordpress, its a great platform too! But i always favour learning the basics so in the event of something going wrong, or not working the way you want it to, you'll know what to do, or at least have an idea. Therefore i'd stick with your own php solution as a starter, then progressing to wordpress, when you feel comfortable.
I hope this helps :)
(X)HTML is the markup language that's interpreted by the browser, to display your web pages.
PHP is a language, used on the server, that can :
Generate that HTML markup
Act as a 'glue' with other systems, such as a database, for data-persitence.
(X)HTML by itself it not dynamic : it's only used to display data.
And PHP by itself doesn't display much information : it generates them.
So, basically, you'll need to use both (X)HTML and PHP :
PHP for everything thats' dynamic
like interaction with a database, a form, ...
HTML (possibly generated by the PHP code) to display the data.
No, you will need some kind of server side scripting language to be able to interrogate a database, print out comments and send the generated HTML to the browser.
If you don't know how to use PHP, how about using an open source solution like WordPress, this is a bloging platform but offers all the things you listed.
I would suggest using WordPress because:
It is easy to learn, the documentation is excellent
There are thousands of free plugins to add functionality to your site
There is a plugin, Contact Form 7, that will allow your users to send your email while doing a good job of curbing spam
There is a built in RSS feed to push out to your users notices when your site is updated
WordPress can be installed on shared hosting, virtual private hosts, and almost any machine with the LAMP stack
If you are new to creating websites, WordPress has free themes which are a good starting place
Finally, to answer your question, XHTML and PHP do different things. XHTML is like the idea of a picture. You can see it, it has shapes, outlines, sometimes words, etc. Where as PHP is like film where viewers can see something, but there is something in the background that is updating and moving.
HTML is just a markup language used by the browser to format data to display to users.
Most hosting solutions provide form mailer scripts that just take an HTML form and email the fields to a specified email address which you can configure.
They also provide mailing list functionality.
So, maybe check for a (PHP) hosting solution that provide this functionality and you won't need to write any PHP until you require more complex, custom functionality.

Validating html generated by php

I'm new at web development, so to make sure I'm writing good code I've been using w3.org validation tools. I'm currently working on a project where I generate a lot of my html with php functions, and I'd like to validate the html, but w3.org doesn't support that. The only way I've found to do it is to render my code, view source and validate that, but that's an awkward, time consuming process, that only approximates validation as it renders differently in different situations. Any suggestions?
Thanks,
Rebecca
Tidy Project:
http://tidy.sourceforge.net/
http://www.w3.org/People/Raggett/tidy/
Good luck.
Edit -
To be clear, with Tidy you can be reasonably certain that the output of your script is valid against a given standard.
You can use Html Validator add-on for FireFox.
The various developer tools in the major browsers will help you validate the HTML your script emits.
IE6/7 - you can install the IE Developer's Toolbar
IE8 has the toolbar built in
FireFox - you can get the Web Developer Toolbar as an addin
I think Opera has some tools built in as well, but quite frankly I only use Opera for testing after I've built using Fx and IE.
The validator tools will not care about php, so if your php is 'bad', it won't care.
It only checks html for concision and proper nesting to the doctype.
Try this, Web Developer 1.1.8 toolbar.
This ad-don works superbly, you can validate locally, for example:
Validate Local CSS
Validate Local HTLM
if you don't have access to some external web-server or even if you do have access to it.
In addition the installation is easy and to validate a given page all you have to do is right click on Tools and there is a whole array of validation options.
https://addons.mozilla.org/en-US/firefox/addon/60
Alternative approach: Hitchhike direct-input at the W3C validator:
( I am also facing the problem, that my staging server would need to be online,
to allow for an easy validate-here link... )
The direct input at the w3c validator submits a form.
Or in other words: The actual validation-page receives a POST request.
So how about: Make a link (i.e. in your footer) that leads to a submitForValidation.php
In that php file:
grab the Referer-URL you just came from (through your localhost server)
submit as POST to the W3C page
Not done it yet, but will probably implement that soon.
Step 1: Run the PHP to generate some HTML, with a command like this:
php index.php > index.html
Make sure that php is in your system PATH variable.
Step 2: Validate this index.html with normal html validation tools.
Opera 12 is good for validating generated pages, you just go to the page, then right click and validate. that's all, so easy that scares lol.

Duplicate explorer/outlook type application on a web page

We have an ancient application that basically duplicates a file explorer, outlook style application in html (menu and toolbar on top, tree on the left, gridview on the right, and yes I know it is a bad idea to bring desktop UI to the web, but it was 2000 and seemed like a good idea at the time). The main problem (other than the HTML is from ~2000) is that it is an Internet Explorer only application, and due to the horrible html is a nightmare to update.
What is the best set of HTML/CSS/Javascript/PHP libraries to achieve this? I have looked a YUI, MooTools, JQuery, and a bunch of others but none seem to have exactly what I need. I would prefer if I could just use PHP libraries, but good HTML/CSS/Javascript libraries would be fine too. The requirements are:
Menus (Top Menu and Context Menu).
Tree (preferably ajax, lazy loading, we have 5000 nodes in the tree and it takes a while to load now).
Windows and Modal Dialog boxes.
Splitter for the Grid and the TreeView.
Nice to haves
Heirachacal grid.
Tool tips.
Thanks in advance for the suggestions...
Have you checked Qooxdoo or Capuccino? It looks like they might cover the UI necessities that you have for this particular project, given that they are oriented to provide the GUI Desktop goodness to the web; make sure to check their demos.
As for the Server side PHP part, I would certainly try to taylor it to my needs but If I had to choose a framework I would go for Yii, Code Igniter or CakePHP, depending of your scalability needs.
Cheers!
I would suggest looking at ExtJS for this sort of thing. You can then quite easily send data between it and PHP using JSON. The grids and trees are very easy to populate from a URL that will provide JSON.

Categories