Jump to content
Sign in to follow this  
Saquib Rizwan

Will you learn PHP in 2017? Or is it considered to be the bad language ?

Recommended Posts

I am a newly graduate developer and I really like to work on PHP. I have a good concept of core PHP and OOP in PHP. I was going to learn the framework now but the thing which make me hesitate about it is that I have seen many developers around the world are opposing PHP and saying that it is a bad language. So my question is should I learn PHP and if yes which framework should I learn first.

Share this post


Link to post
Share on other sites

I would recommend learning JavaScript over PHP, knowing JavaScript well will enable you to build apps across the stack as it can run both on the client, server and many embedded systems are also running JavaScript.

You will also pick up things like functional programming which is a different paradigm to OOP and is rapidly growing in popularity. There are many other languages too and while PHP is popular it's not the best paid because of how common PHP devs are and developers in languages such as JavaScript are becoming increasingly sought after.

 

All this said whats more important than learning individual languages is learning programming fundamentals, data structures and how to write clean code. These skills are transferrable to any language.

If you want to give JavaScript a go I recommend you begin here https://github.com/getify/You-Dont-Know-JS/blob/master/preface.md

Edited by rbrtsmith

Share this post


Link to post
Share on other sites

GO ahead and learn Laravel, one of the most powerfull frameworks.

 

 

"Laravel is a free, open-source PHP web framework" - Is this not PHP?

 

Back to the OP if like to work with PHP then go for it, good PHP developers are the reason things like Laravel and WordPress exist. Learning foundation PHP IMO is much better than learning a framework, just like in the JS world a Javascript developer is better than one who only knows jQuery, sure know both but understanding the actual foundation language is what will make you stand out from the crowd.

Edited by BrowserBugs

Share this post


Link to post
Share on other sites

 

While it is important to learn the fundamentals of the language, I wouldn't recommend doing much serious development in pure PHP. Frameworks like Zend, Symfony and Laravel are high quality and will strip away a lot of boiler plate that you would otherwise have to write yourself. Generally speaking you'll find these frameworks have lots of very well written modules that can be reused all over the place, and because they're maintained by teams and used by thousands of people the world over, they tend to be much more secure and stable than code you would likely write yourself.

 

They save a tonne of time, teach good strong OOP practices and are generally of such high quality that using them and learning how they all work will turn you into a better developer. For almost anything in PHP I would use a framework of one kind or another.

 

I'm not discounting the frameworks, just pointing out that understanding the foundation of what these modules do would be beneficial, at the end of the day some people write these frameworks, unless they use frameworks in frameworks?

 

I'm having trouble finding a real auto electrician at the moment, simply because unless they can plug in my car for a diagnostics code they are clueless, but a real auto electrician can diagnose with resistance etc and not simply rely on software telling them which unit might be at fault. Similar to WP devs lol.

Share this post


Link to post
Share on other sites

At the end of the day our jobs are to write software with as few bugs as possible. While it's important to learn low level to gain a stronger understanding these frameworks abstract away a lot of boilerplate and greatly reduce the amount of code you have to write - in turn reducing the probability of bugs. Also means you have fewer tests to write.

 

These frameworks are merely tools.

When you employ somebody to perform a task you expect them to use the best tools for the job. Raw PHP or RAW Node is very rarely the best tool for the job. The strongest engineers will know when to use what tool, I work with some of the strongest developers in the industry - Paul can attest to that - they use frameworks and libraries very regularly. They could very easily build from scratch but that is not what they get paid to do.

Edited by rbrtsmith

Share this post


Link to post
Share on other sites

In order to use these frameworks you usually need to have a strong understanding of OOP for example, so actually you can't really use them until you comfortable with the language itself. Most amateur/new php programmers would struggle to even use them. They're not tools for amateurs - kinda the opposite...

 

They could very easily build from scratch but that is not what they get paid to do.

 

This was my point, in both cases the foundation knowledge is there. I understand the use of frameworks, can see the benefit of them, however the main bee in my bonnet is because the majority of questions on here is stuff like "why doesn't this work' when they are using something like bootstrap yet they don't even understand the principle of float. Do we learn Bootstrap over css?

 

So back to the OP, is php a 'bad' language?

Share this post


Link to post
Share on other sites

 

 

This was my point, in both cases the foundation knowledge is there. I understand the use of frameworks, can see the benefit of them, however the main bee in my bonnet is because the majority of questions on here is stuff like "why doesn't this work' when they are using something like bootstrap yet they don't even understand the principle of float. Do we learn Bootstrap over css?

I completely agree A developer absolutely should learn CSS - I wouldn't even bother with Bootstrap, My own Nebula, or BBC's Grandstand are far better. Think of Bootstrap as an all bells and whistles product like WordPress. Nebula is more like Laravel - It's a true framework and makes no upfront design decisions about what your application is or how it looks. It's just architecture.

 

As for JavaScript I heavily use React. But I would never instruct a beginner to begin with it. They should first learn JavaScript and do so to a high standard, then look to a framework like React. However in production you should always use the best tools at your disposal for a given task :)

Share this post


Link to post
Share on other sites

I completely agree A developer absolutely should learn CSS - I wouldn't even bother with Bootstrap, My own Nebula, or BBC's Grandstand are far better. Think of Bootstrap as an all bells and whistles product like WordPress. Nebula is more like Laravel - It's a true framework and makes no upfront design decisions about what your application is or how it looks. It's just architecture.

 

As for JavaScript I heavily use React. But I would never instruct a beginner to begin with it. They should first learn JavaScript and do so to a high standard, then look to a framework like React. However in production you should always use the best tools at your disposal for a given task :)

 

But i think some of the good things about bootstrap is you can do things like class="btn btn-sm btn-primary" to create a button etc.. as from what i'm understanding if i used your framework I would have to write the css to actually create a button instead of using classes that are already built in for this task. Is that correct? If that is indeed the case um why would i wanna write the css for my own buttons and use your framework then to just use bootstrap. Doesn't seem to time saving to me. But then again i've never used yours so I could be off base in my assumptions.

Edited by webdesigner93

Share this post


Link to post
Share on other sites

 

But i think some of the good things about bootstrap is you can do things like class="btn btn-sm btn-primary" to create a button etc.. as from what i'm understanding if i used your framework I would have to write the css to actually create a button instead of using classes that are already built in for this task. Is that correct? If that is indeed the case um why would i wanna write the css for my own buttons and use your framework then to just use bootstrap. Doesn't seem to time saving to me. But then again i've never used yours so I could be off base in my assumptions.

 

The problem is that button and many other elements in Bootstrap are cosmetically themed based on their designers decisions. Unless your design decisions match theirs you are going to be overriding and undoing styles which leads to an unmaintainable mess. You shouldn't be modifying a framework, you should only extend them (Open closed principal).

And in reality making a button is extremely straightforward. The difficult part of CSS - the architecture is what frameworks like Nebula and Grandstand abstract away leaving developers and designers to focus on the cosmetics.

 

I get what BrowserBugs says, that a lot of Bootstrap consumers claim they are front-end developers but can barely code their way out of a paper bag when it comes to CSS. Like JavaScript, CSS should be properly learnt by developers working on the UI. Bootstrap is convenient to these developers because they can have a UI out of the box but that comes with very real limitations as I've explained above.

IMO Bootstrap is useful when you just need a quick, presentable UI and you don't care about any branding or theming - spiking our some API or building an interface to a private API.

 

.btn {
  display: inline-block;
  padding: .5rem 2rem;
  border-radius: 3px;
  text-align: center;
  color: white;
  background-color: grey;
}

.btn--sm {
  padding: .25rem 1rem;
}

.btn--lg {
  padding: 1rem 4rem;
}

.btn--success {
  background-color: green;
}

.btn--error {
  background-color: red;
}

The button module above took literally a minute to write. Another benefit of Nebula and Grandstand is that they are built on ITCSS and BEM which when used properly allow a Sass/CSS architecture to scale to huge levels with multiple contributors without the typical maintenance issues.

 

Your initial timesaving doesn't account for the time wasted dealing with specificity issues down the line. This time is an investment.

 

Paul talks about TDD a lot on here and one thing that often comes up is that it takes time to write tests. Yes it does, but it also means that you have confidence that your code works, or the code that a contributor has issued a pull request for works. You might need to re-factor this code or add a new feature. With tests you can be sure that you have not broken anything - like through a side-effect. These are all investments in time that have been proven to save money and time in the long term.

When getting paid to write software you're not being paid to do it quickly, you are being paid to do it right.

Edited by rbrtsmith

Share this post


Link to post
Share on other sites

Though JavaScript does not need a server to run but still the frameworks of PHP like laravel and Magento 2 are responsive and easy to understand. You can also go with the Wordpress which is a PHP framework. In today's time, more than 30% websites are made using WordPress. So it is also a convenient option. Javascript is interesting as well, JQuery is a library of the Javascript which has a huge number of classes and very easy to code. The frameworks like Angular JS and node.js are in the discussion for quite a few time. It is stated that node.js is the most preferred language for the coding side of IOT.

Edited by ssraj

Share this post


Link to post
Share on other sites

PHP is definitely worth learning. I like JS, Angular, React etc. HOWEVER, try breaking a PHP application by turning JS off in the browser.

 

Yes, I know React can run server-side and all that but if it worked that well then I think we'd see Facebook doing that and they don't. I read over and over again that React is the way forwards and see lots of arguments for why it is awesome, but PHP still has it's advantages and I won't be turning my back on it any-time soon I don't think.

 

As Paul mentioned above, there's lots of rubbish PHP out there. There's also a lot of rubbish JS for much the same reasons really.

 

In summary, PHP is worth learning, properly. JS is good and you're also going to need it for the pretty stuff if nothing else. So learn both.

Share this post


Link to post
Share on other sites

PHP is definitely worth learning. I like JS, Angular, React etc. HOWEVER, try breaking a PHP application by turning JS off in the browser.

 

Yes, I know React can run server-side and all that but if it worked that well then I think we'd see Facebook doing that and they don't. I read over and over again that React is the way forwards and see lots of arguments for why it is awesome, but PHP still has it's advantages and I won't be turning my back on it any-time soon I don't think.

 

As Paul mentioned above, there's lots of rubbish PHP out there. There's also a lot of rubbish JS for much the same reasons really.

 

In summary, PHP is worth learning, properly. JS is good and you're also going to need it for the pretty stuff if nothing else. So learn both.

 

You can pair React with PHP, Facebook do this at the moment. React DOM is only really concerned with the frontend, the benefit of server-side rendering is for performance mainly, and SEO.

 

The reason why Facebook use PHP is historical, they had difficulties scaling it, at one point they converted PHP to C++ code or something, before creating a new re-implementation of PHP called Hack. Parts of the stack definitely run on Node, just like parts use Erlang, they use a language where it makes the most sense. If they started from scratch I have no idea what they would choose, I'm not even sure if they would go with Node.

 

I get what you're saying, PHP has come a long way, just like JS has, both have pros and cons. I like the modern PHP ecosystem, frameworks like Laravel are extremely powerful. Node seems to suit those that want more fine grained control over their architecture, whereas PHP is more convention over configuration. I think ultimately it comes down to preference, just work in what you enjoy the most, otherwise you'll always struggle to progress if you don't enjoy it.

Share this post


Link to post
Share on other sites

The reason why Facebook use PHP is historical, they had difficulties scaling it, at one point they converted PHP to C++ code or something, before creating a new re-implementation of PHP called Hack. Parts of the stack definitely run on Node, just like parts use Erlang, they use a language where it makes the most sense. If they started from scratch I have no idea what they would choose, I'm not even sure if they would go with Node.

I would imagine (Probably already well on their way already) they would use a microservice approach which would potentially involve many languages. I would suspect Node for handling a lot of the async stuff (That's what it is very good at) and others for more computationally heavy things (Python, Go etc)

 

I'm not sure there's much of a need for PHP in large greenfield projects as there's better options out there, but one important factor is the skillset of the team - PHP devs are definitely more plentiful and so easier to find and hire so thats a reason why PHP might still be used.

 

I think with the popularity of frameworks like WordPress it will still continue to be heavily for brochure type sites, it's pretty good at serving those.

 

I've recently completed the Wes Bos Node course and that highlights what can be done with Node, especially with the enormous amount of packages on NPM it's just a joy to work with.

Edited by rbrtsmith

Share this post


Link to post
Share on other sites

I've recently completed the Wes Bos Node course and that highlights what can be done with Node, especially with the enormous amount of packages on NPM it's just a joy to work with.

I haven't started it yet, what are your thoughts on it?

Share this post


Link to post
Share on other sites

I haven't started it yet, what are your thoughts on it?

 

I think it's a really good introduction to Mongo/Mongoose which I hadn't used before beyond the most trivial of instances. He makes good use of Async/Await for consuming promises. I like how he introduces MVC architecture.

 

He does the templating on the server-side though. I think the more modern way of doing this is to make the backend API just send JSON responses out rather than rendering templates. The front-end service itself can still render server side with React/Vue and just query the API to get the responses back.

 

But I felt like I've learnt a lot from doing this. I guess it depends how much prior Node / Express experience you already have, at least in terms of building a real application. Would be much better if he introduced some unit testing...

Share this post


Link to post
Share on other sites

I started on it but gave up half way through. It was ok to a point I thought, but I wasn't learning all that much so decided to stop. There still may be some sections I may go back to in the future, like the mongo side of things.

 

TBH I don't agree that PHP is such a bad choice. PHP has made lots of great improvements over the years, and it's perfectly possible to write excellent code that will scale nicely in PHP. It's still not a bad choice in my opinion, but I do generally prefer node these days, mostly because I've been using it a lot in work, and I've found that the general day to day experience is a pleasant one. Having said that, it's true that the JS world is kinda crazy these days - I agree with a lot of the comments about JS fatigue. My friend who mostly uses Ruby started a React project fairly recently, and in his words "Getting up and running nearly broke me". JS is by no means perfect and PHP remains a good option.

 

There does seem to be a lot of traction in the JS world these days though, so if I were learning from scratch I'd recommend JS more than PHP. Just be prepared to spend a lot of time learning - PHP is a lot easier to get up and running in my opinion, and it's also a much more stable language than JS these days I'd say.

Did you not introduce you mate to create-react-app? It's a great package for somebody who just wants to get a React dev environment up and running quickly.

 

BTW I wasn't saying PHP is a bad language. I just think when going with a microservice approach you pick the language most suited to that service. I can't think of any instances where PHP would be the best choice for a service. Only that your team might already be skilled in PHP, and in that case then it's definitely a viable option.

Share this post


Link to post
Share on other sites

Yeah, the issue with create-react-app though, while it's a great package, is that it does so much for you under the hood. For someone who wants to understand what's going on, it's all a bit much.

 

I do enjoy Node as you know, as well as React, but the learning curve for this stuff is certainly very high.

I agree it's high, but it is helping to solve some very difficult problems on the frontend, especially now with the complexity that consumers are becoming accustomed to.

To try and solve things like module bundling, transpilation, code splitting, client routing along with all the DOM stuff that React abstracts would be much, much harder to do manually. Redux helps solve shared state, especially over time. Relay looks to be solving shared state between the client and API but I've not really looked into that much. But it stands that these are really complex problems.

Frontend has also always been really hard to test, and I think React has helped massively there too.

 

I think that the fact a lot of these problems have only recently been solved or are in the process of being results in a lot of flux and change in best practices. I'm confident over the next few years or so things will slow down a bit as best practice emerge - although there's always gonna be innovation and flux when working with bleeding edge technologies.

Edited by rbrtsmith

Share this post


Link to post
Share on other sites

The JS ecosystem, is one of, if not the best out there IMO, but I can't help but think it will cause issues in a few years that we're not seeing now. A lot of the solutions and packages out there are still treated as side projects and have no guarantee of being around for the long term, a lot of amazing ideas and libraries are abandonware already after a year or so. It's great that now developers have so much choice when it comes to adding packages, you can choose your own method of auth, caching etc, but I think developers will find themselves ripping a lot of code out and having to replace it if they aren't careful. Micro Services are not a silver bullet, they require a lot of careful planning, otherwise you simply lose the benefit that the architecture provides.

 

I think this is why companies like Netflix and Facebook tend to write the essential parts themselves, and only use projects that have significant resources behind them, or proven long-term backing. React Router is an example that you don't typically see in communities like PHP and Ruby, the code has been totally re-written 4 times in 2 years. I'm not dissing RR, V4 is really nice to work with and a massive improvement, but I can sympathise with developers having the burden of upgrading a third time when they have other things to be doing. If you multiply this across potentially hundreds of packages it starts to become a nightmare to work on.

 

I can see why something like Laravel or Rails would appeal to developers for this reason, usually all of the essential parts of the app first-party, at a cost of having to do things 'the Rails away'. It's not like these solutions stagnate either, if the community is starting to do real-time work, the framework authors will work out a way of providing a first-party solution. It's a tradeoff like most things, but I definitely see why a consistent architecture, same method of writing code, same method of testing, and easier upgrade path would appeal to the masses. It's also a good solution for start-ups because you can spend more time on writing code than playing around with the architecture. Rails helped Twitter get to 250mil users (not well, though) before the Scala re-build, as well as helping other companies like Shopify and AirBNB get to where they are today. As far as I know, Node doesn't have a Rails-like framework with any major backing, which still makes Rails and PHP frameworks a fair option.

Share this post


Link to post
Share on other sites

Yeah, the issue with create-react-app though, while it's a great package, is that it does so much for you under the hood. For someone who wants to understand what's going on, it's all a bit much.

 

I do enjoy Node as you know, as well as React, but the learning curve for this stuff is certainly very high.

 

There's an issue on Github I saw recently where people weren't aware that CRA turns your code into a progressive web app automatically. Obviously this can introduce buggy behaviour and confusion, as well as apps being unknowingly cached indefinitely if you screw it up. I think I would prefer a name change to react-cli and have templates like vue-cli, where you can choose a build process for the type of app you're building https://github.com/vuejs/vue-cli. It seems like a nice approach.

Share this post


Link to post
Share on other sites

We've been doing the same at work, only consume projects with significant backing for live projects. We're in the process of open sourcing a React Timeline package https://github.com/JSainsburyPLC/react-timelines Still lots of work to do around documentation and producing a demo but we've been very careful not to have a large dependency tree. In fact we only have devDependencies and peerDependencies having manually built out various utilities and so on.

As for RR4 there's no real reason for consumers to upgrade from v3 as the RR team have pledge to continually support, develop and accept contributions for v3. But I still understand the pain developers have to go though - but this is kind of indicative of working at the bleeding edge in an area thats receiving a huge amount of innovation.

 

One just has to make smart decisions on what packages they consume on live projects - looking at gh-stars, contribution history, company backing. React is very safe to use for example as it's backed by Facebook and they have additional vested interest in that they actually consume it really heavily on their flagship application.

Edited by rbrtsmith

Share this post


Link to post
Share on other sites

He does the templating on the server-side though. I think the more modern way of doing this is to make the backend API just send JSON responses out rather than rendering templates. The front-end service itself can still render server side with React/Vue and just query the API to get the responses back.

I remember thinking the first thing I would do when it came to that section is to install something like Nunjucks instead of Pug. I can't stand the syntax Pug uses. Nunjucks is the same as Twig in PHP, which is used in Craft, so I don't have to learn anything new, and yeah I would probably prefer the API route anyway.

Share this post


Link to post
Share on other sites

I remember thinking the first thing I would do when it came to that section is to install something like Nunjucks instead of Pug. I can't stand the syntax Pug uses. Nunjucks is the same as Twig in PHP, which is used in Craft, so I don't have to learn anything new, and yeah I would probably prefer the API route anyway.

I didn't mind the Pug syntax too much but I just don't think the API should really be concerned with getting request and sending back the relevant data (JSON) and let the frontend deal with how that is represented.

 

That all said I've still learnt a lot from the course and I'll be doing it again to help cement that knowledge :)

Edited by rbrtsmith

Share this post


Link to post
Share on other sites

I am a web developer with plenty of experience with PHP and knowledgeable on OO PHP. PHP is NOT a bad language, it is a bad language when it is done badly! People need to learn the fundamentals before even deciding to work with PHP, Good knowledge of how to use PHP effectively and correctly will go a long way.

Share this post


Link to post
Share on other sites

 

But i think some of the good things about bootstrap is you can do things like class="btn btn-sm btn-primary" to create a button etc.. as from what i'm understanding if i used your framework I would have to write the css to actually create a button instead of using classes that are already built in for this task. Is that correct? If that is indeed the case um why would i wanna write the css for my own buttons and use your framework then to just use bootstrap. Doesn't seem to time saving to me. But then again i've never used yours so I could be off base in my assumptions.

 

 

Bootstrap is a UI Kit. Nebula seems to be more of a utility base for your project. https://tailwindcss.com/ is similar too.

 

For clarity, not every project has be based upon Bootstrap. There are some projects where it's preferable to have no styling/assumptions made for you. Shock horror, CSS is still written! :)

Share this post


Link to post
Share on other sites

 

 

Bootstrap is a UI Kit. Nebula seems to be more of a utility base for your project. https://tailwindcss.com/ is similar too.

 

For clarity, not every project has be based upon Bootstrap. There are some projects where it's preferable to have no styling/assumptions made for you. Shock horror, CSS is still written! :)

 

This is one of the reasons I built Nebula UI https://nebulaui.github.io/nebula/

It offers multiple packages depending on your level of buy-in. If you just want a CSS architecture that is devoid of cosmetic design decisions then this would be a good starting point.

Share this post


Link to post
Share on other sites

 

This is one of the reasons I built Nebula UI https://nebulaui.github.io/nebula/

It offers multiple packages depending on your level of buy-in. If you just want a CSS architecture that is devoid of cosmetic design decisions then this would be a good starting point.

 

Nebula looks good. I really like Tailwind too. The only thing that puts me off Tailwind is the build process, using JavaScript / Npm. Would really prefer some well structured sass files.

 

It's kind of annoying that Twitter Bootstrap has become such a standard that everything is compared against it. People, it's possible to create a site without Bootstrap in 2017 :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Similar Content

    • By Lyndsey
      Hi guys,
       
      I thought it would be cool to start a topic for people to share sites they find useful for their design/development processes. Here is a list of sites I find useful and/or use regularly:
       
      General Stuff:
      http://jsfiddle.net/ - Useful for JavaScript troubleshooting. Test your code and just play around with HTML/CSS and JavaScript. If you're looking for help with a piece of code, save your Fiddle and send it to someone else who can take a look at it You can also save revisions of your Fiddle to track your progress. http://pastebin.com/ - Useful for sharing code online. Useful for when you run in to a bit of trouble with some server-side code. Instead of pasting masses of lines inside a topic, paste your code in to pastebin and get someone to have a look at it for you http://jsonlint.com/ - JSON Validator http://paletton.com/ - Color Scheme Designer. See what colours complement each other etc. Useful stuff. http://www.lipsum.com/ - Lorem Ipsum - Useful for inserting dummy text in to your web pages. http://net.tutsplus.com/category/tutorials/php/ - PHP tutorials, quizzes etc. They also do the same for JavaScript, HTML, CSS, WordPress, ASP.NET to name a few. Really good site.  
      Javascript:
      You Don't Know JavaScript - https://github.com/getify/You-Dont-Know-JS JavaScript scene https://medium.com/javascript-scene Webpack Asset bundler https://webpack.js.org/ Jest, Automated tests for JavaScript https://facebook.github.io/jest/  
      CSS:
      http://css3generator.com/ - Generate CSS3. Box Shadow, Border Radius etc. http://border-radius.com/ - Generate border radius quickly! http://www.javascripter.net/faq/hextorgb.htm - HEX to RGB conversion. http://meyerweb.com/eric/tools/css/reset/ - CSS Reset Stylesheet. Resolve browser inconsistencies such as varying margins/padding. http://www.cssplay.co.uk - Lots of experiments with CSS, menus and layouts. CSS Wizardry: https://csswizardry.com/ Sass Guidelines https://sass-guidelin.es/  
      Responsive Design:
      http://www.getskeleton.com/ - Responsive Grid. Nebula - a framework built by WDF member, rbrtsmith: https://nebulaui.github.io/nebula/  
      Server-Side Coding:
      http://net.tutsplus.com/tutorials/php/php-database-access-are-you-doing-it-correctly/ - How to connect to a database using PDO http://www.php.net/manual/en/index.php - PHP manual for everything PHP!  
      Form Validation (Client-Side):
      https://jqueryvalidation.org/ - (My preferred method) Simple to use. Include the necessary jQuery and Validation.js files. Simple usage example, call the function using $('#myForm').validate(); and add a class="required" to fields you want to validate Also allows you to create custom messages and make the validation more advanced! I hope these are useful! If anyone has any others to share, please do
       
      Lyndsey.
    • By GrahamUK33
      Is it good to use page extensions in the URL such as .HTML .PHP
       
      Are there any Pros and Cons using/not using page extensions?
    • By Drummer
      Hi guys
       
      I've created a website which i would like to "wrap" in a members-only environment. I don't want to re-invest the wheel, but looking for a register page, login page, password reset, and all the links/instructions to hook it up to the remote server the website is currently on.
       
      Does anyone have any pointers for this type of thing? I've tried googling, but struggling tbh!
    • By rainland
      Hello all,
       
      I'm planning on making a website, which will have a calculating web form in it.
      The form will have to do various basic mathematical tasks like multiplication and division for example.
      Also a very big plus for the form would be the possibility to save and load it (I'm thinking like either a database where you could save using a specific string and load by it or save as a xml file to the local computer or something).
       
      Now the qustion is what would be the best way of implementing this kind of site/tool?
       
      I know html5 and css and am fairly adept in C but everything else (javascript, php etc.) is unknown to me. Now, learning a new language will not be a problem because I will have lots of time to develop.
       
      I was thinking WordPress because of its ease of use and ive found this plugin but I am unsure of whether it will be able to have the save/load function.
       
      What do you guys think? How would you do this? Thanks in advance for your thoughts and feel free to ask any additional questions if I've missed something.
       
      regards,
      rainland
    • By techkid
      Hi there,
       
      I am writing a website for a friend. The goal is to allow people to write and submit poetry to help with depression and anxiety, provide messages of hope and things like that. I have created most of the website, but one section has got me stumped.
       
      What I want to implement is an approval process, where submitted poetry is segregated until reviewed and approved, given the proliferation of online trolls around such things. What I want to achieve is to have a form where a piece is reviewed with radio button selections for "approve" or "delete", and this is where I have stalled.
       
      This is what I have created:
       
      review.php
      <!DOCTYPE html> <html> <head> <title>Soul's Fire - Review Submissions</title> </head> <body background="Images/background.png"> <center><img src="Images/heading.png"></center> <h1 align="center"><font color="#cc9900">Soul's Fire - Review Submissions</font></h1> <p align="center">Words go here</p> <?php error_reporting(E_ALL & ~(E_WARNING)); $dbconnect=mysqli_connect("127.0.0.1","user","password","poems"); $result=mysqli_query($dbconnect, "SELECT * FROM submissions WHERE Approved='N' ORDER BY Time_Submit LIMIT 1"); if ($row=mysqli_fetch_array($result)) { echo "<form action='adddel.php' method='post'>\n"; echo "<div align='center'>\n"; echo "<table border=1 width='80%'>\n"; echo "<caption align='bottom'><p><input type='submit' name='AppDel' value='Submit Approval'></caption>\n"; echo "<tr><th width='10%'>Author</th><th width='15%'>Title</th><th width='15%'>Time Submitted</th><th width='*'>Entry</th></tr>\n"; do { printf("<tr><td align='center'>%s</td><td align='center'><b>%s</b></td><td align='center'>%s</td><td>%s</td></tr>\n", $row["Author"], $row["Title"], $row["Time_submit"], $row["Entry"]); } while ($row=mysqli_fetch_row($result)); echo "<tr><td colspan='4' align='center'><INPUT TYPE='radio' NAME='ConApprove' VALUE='Approve'>Approve Submission <br><INPUT TYPE='radio' NAME='ConApprove' VALUE='Delete'>Delete Submission</td></tr>\n"; echo "</table></div><br></form>\n"; echo "<p align='center'><a href='#top'>Back to Top</a></p>"; } else { echo "No entries to review."; } ?> <div align="center"> <A HREF="index.php">Return to the main page</A> </div> <h1 align="center"><font color="#cc9900">If you would like me to add content down here, let me know</font></h1> </body> </html> adddel.php
      <?php $error=""; $go=TRUE; $dbconnect=mysqli_connect("127.0.0.1", "user", "password", "poems"); if(!$dbconnect) { die('Unable to connect to database.'); } $AppDel=$_POST["ConApprove"]; if($AppDel=="Approve") { $message .="This will approve the submission. Continue?\\n"; $ApproveSet=("UPDATE submissions SET Approved='Y' WHERE ID=$row['ID']"); } elseif($AppDel=="Delete") { $message .="This will delete the submission. Continue?\\n"; $ApproveSet=("DELETE FROM submissions WHERE ID=$row['ID']"); } else { $error .="Please select before continuing\\n"; $go=FALSE; } if($go==TRUE) { echo ("<script language='JavaScript'>message('$message');</script>"); mysqli_query($dbconnect, $ApproveSet) or die(mysqli_error()); echo "<A HREF='review.php'>Return to review page</A>\n"; } else { echo ("<script language='JavaScript'>alert('$error');</script>"); echo ("<script language='JavaScript'>javascript:history.go(-1)</script>"); } ?> But when I select any option I only receive an error message (see attachment).
       
      I am only just recently getting back into website design after about 15 years, so my knowledge is pretty archaic and rudimentary. I have created basic forms for this website, which work with no problem, but this one is probably too ambitious for my limited knowledge.
       
      Thank you in advance.
       

  • Recently Browsing

    No registered users viewing this page.

  • Member Statistics

    • Total Members
      57,712
    • Most Online
      4,970

    Newest Member
    adabo
    Joined
  • Forum Statistics

    • Total Topics
      65,780
    • Total Posts
      454,595
×