@CS Geek: Exactly ! Super Easy !
- Someone told me I should use $_GET !
- Does the code need placing in a different PHP file ? Or can it reside in the same file ?
EDIT: Sorry forgot the topic of this thread
@CS Geek: Exactly ! Super Easy !
EDIT: Sorry forgot the topic of this thread
If itâs a form thatâs posting a value then use POST. If you are trying to get a URL parameter use GET, or you can just use REQUEST to do both and save time:
Use Get or Request (I prefer request): index.php?value=true&othervalue=false
Use Post or Request (I prefer post): <input type=âtextâ name=âhiâ />
It is not a form and it is not a value from a URL.
It is a Simple Click on a Button. hehe See why I say ASP.NET is much easier when it comes to Button Clicks.
Ciwan, do you learn PHP at university as well or just ASP.NET? And which language you learn with ASP.NET is it C# or VB.NET?
Why does this remind me of the old quip âThose who can, do. Those who canât, teach.â Your teachers are out of touch - PHP has about 3 times the market presence that ASP.NET does. Hell, Java has more presence than all .NET deployments combined.
What is more than likely is your institution is bought and paid for by Microsoft and they are telling that lie to prevent biting the hand that feeds.
No we donât sadly !! The Lecturers decided to teach us ASP.NET cause they say the Industry has higher demand for ASP.NET developers than they do PHP ones !!
Thatâs what they told me ! Though I still want to learn PHP cause you can see everything. There is no hidden code âŚetc Plus it is free in terms of servers âŚetc
However when I get to stuff like button clicks and such ⌠I can definitely see the advantage of ASP.NET ⌠it is much easier to build a fully working application in ASP.NET (check out videos on their site) than it is in PHP I think !
True there will be a lot of generated code âŚetc but if that code doesnât affect the speed (which Iâm not sure if it does or not) ⌠then itâs OK I guess LOL
The Lecturer is teaching us VB, however I always go with C# cause I learnt Java in my first year ⌠and C# is closer to Java than it is to VB.
Itâs fine but⌠You should also learn what is actually happening, what a form is, how it works, what Post variables are, how to pass parameters in the url in an http get request, etc. This is all the stuff that underlies what youâre doing, and if you donât know it youâre limited in what you can achieve.
Itâs also quite important in terms of SEO to be using the right kind of request. Iâm fixing up a site at the moment which uses a post request to paginate news items. This means the URL is the same for each page of news so their old content isnât getting indexed and theyâre not ranking. I see this sort of stuff all the time from ASP developers.
Simple is good but you really really need to know whatâs being simplified
I like the much in php but I dislike the framework by third parties.
When it comes to Forms I fully understand how the $_POST and $_GET work.
Iâve watched many tutorials on this, from KillerPHP.com and many other sites that offer PHP video tutorials.
But >> Isnât this different ? Isnât a button click different from a Form and how to process a form ?
Ouch !! haha
It could be true ⌠I donât know ⌠Iâm just a little ant trying to learn both.
A button is a form element. It has to live inside a form to work (unless youâre using some fancy-shmancy ajaxy javascript). The ASP sites Iâve seen wrap the whole page in a form, and button clicks submit that form. Check your html on one of your sites and see if Iâm right
I am still getting my head around ASP.NET. The wrapping the whole thing in a form, comes down to the author does not know how to code, and is using a WYSIWYG editor, or there is something wrong with the code, so when it hits the server, the server is like elephino (Source), and wraps it all in a form.
I miss that show too
@GoldFidget: you are right, the whole thing is wrapped inside a form element. When we were first introduced to ASP. NET I actually asked my lecturer why this form element was here !! He said just ignore it and do the work as if it is not there !!! Lol I didnât like it, but then I thought > if it works nicely > let it be.
By the way I still havenât built anything in ASP, weâre still being introduced to it.
I have actually talked to a couple of businesses regarding this and they said they DO NOT CARE about ASP.NET OR PHP. lol which I found surprising at first.
They said " We want something that just works and does what it is suppose to at decent speed, also looks good and user friendly "
These sort of discussions only go o. Between us code geeks. Business doesnât give a crap hehe
So now you know how it works
Youâll also often find a bunch of hidden input fields like viewstate which lets you track sessions across multiple forms. You wouldnât know unless you looked for them and it would seem like it just works by magic. On the internet, nothing is magic, and everything is
Yep, they just want the job done. If youâre a freelancer doing a small CMS, for me, itâs Wordpress all the way.
Thatâs true, but Visual Studio also makes things easier for the developer espeically for maintenance later on.
Forms can cause issues with accessibility. So depending on how the page is and who it is for, just going with âoh it looks fineâ could wind you up in a world of hurt.
Do you mean forms in ASP.NET? What issues with accessibilty are you talkining about, could you give me an example?