trq
Staff Alumni-
Posts
30,999 -
Joined
-
Last visited
-
Days Won
26
Everything posted by trq
-
Agreed. That is some terrible coding right there.
-
I suggest you find out what framework it is your application is using and find a forum that supports it. The code you have posted isn't stock standard PHP.
-
I would suggest that the best CMS to go with is likely the one you know best. Any CMS is quite capable of the functionality providing they are being setup by a developer in the know. Personally, I would be more inclined to go down the bespoke path, maybe starting with a CMS framework such as Symfony2 CMF. I guess it depends on your time frame and budget though.
-
$row is not an array.
-
It is a fairly common approach yeah. Just so you know though, your not dealing with JavaScript arrays here, but simple objects.
-
Hey doloreel, welcome. I'm from Sydney too, well, central coast anyway. I see programming as being very creative endeavour, and I know a lot of people who have had previous experience in different forms of art. I myself, was a musician in a previous life.
-
Looks like your parameters table has gone missing. Do you have access to a shell on the server?
-
And you have clients paying you to create these websites?
-
Ajax.
-
You need a javascript array, not a php array.
-
Comparing MySQL Password() to PHP/Javascript, Force Different Password
trq replied to ajbarlow87's topic in PHP Coding Help
It's not just bad practice. The password function should never be used. It can change between mysql versions without warning breaking your data. Most "change password" page will also ask for the current password. You can use this to check the new password is indeed new, and then again, on the server side you can verify that they have indeed given you the correct old password. You should be able to google plenty of resources regarding storing passwords in mysql using php. -
If you don't want to load your data via ajax (which of course will incur a delay) you will need to load it all up front. I would suggest storing it in an array or json. Now, please stop posting javascript questions in the PHP Help forum. I'm starting to get tired of moving your threads.
-
Help a beginner with MSQL connection issues
trq replied to ajaxsoundscool's topic in PHP Coding Help
The error is pretty self explanatory. The user named "user" does not have permission to acces the mysql server hosted on localhost using no password. -
What exactly does that mean?
-
I don't understand that questions sorry. How are they "tied to a number" ? Another thing I don't understand is, why does your MemberTopic class extend ConnectMySQLClass? MemberTopic is quite obviously not a database connection type. The relationship makes no sense. A massive part of OOP is dealing with object relationships. This code does not describe these relationships at all well.
-
A little off topic, but if you are using this code to learn OOP, don't. All those code will teach you is bad coding practices. Even at a glance there is some glaringly obvious poor design / coding decisions being made. Public properties, global variables and static methods everywhere. Forget you ever found this code.
-
PHP Exec Function Doesn't work with cd Ubuntu Command
trq replied to unemployment's topic in PHP Coding Help
shell_exec executes code in a new shell process. Meaning, if you call cd, it only changes directory for that process. Any subsequent calls to shell_exec will be executed from the original directory. I don't see why you would be using php for this at all. Use bash, and your issues will go away. -
PHP Exec Function Doesn't work with cd Ubuntu Command
trq replied to unemployment's topic in PHP Coding Help
Who the hell uses shared hosting these days? -
You'll want to Google "JavaScript pushstate"
-
PHP Exec Function Doesn't work with cd Ubuntu Command
trq replied to unemployment's topic in PHP Coding Help
See also chdir -
Just because it's popular doesn't mean it's well designed. Codeignitor is easy to use, and therefore has a pretty good following of people who are new to frameworks and don't know any better. From a design perspective, CI is absolute rubish. I know people who were at one point in time making all of there cash through building web sites on top of this platform. Even these guys (who were being flown around the world for work) have moved to other, more modern, better designed frameworks and are once again, making a killing.
-
This is where using arrays comes in handy: $result['title_' . $lang]; What your trying to do is called variable variables and is far less efficient / easy to follow.
-
Where exactly are you struck? You haven't asked any question.
-
how can i delete value in database through html form?
trq replied to devimohan1988's topic in PHP Coding Help
You have most of the bits required for this to work commented out. -
See http://forums.phpfreaks.com/topic/273121-readme-php-resources-faqs/?do=findComment&comment=1405508