Search found 24 matches

by thinsoldier
Tue Dec 12, 2017 10:50 am
Forum: PHP coding => General
Topic: How to show data from mysql database in decending order using pdo?
Replies: 2
Views: 233

Re: How to show data from mysql database in decending order using pdo?

You might be better off using a query building library like Aura sql or Idiorm.
by thinsoldier
Sun Dec 03, 2017 10:08 am
Forum: PHP General
Topic: Getting a SQL error from my insert query on my PHP page
Replies: 2
Views: 692

Re: Getting a SQL error from my insert query on my PHP page

I suggest just using a query builder library like https://github.com/auraphp/Aura.SqlQuer ... /insert.md instead of doing sql string building yourself.
by thinsoldier
Sun Dec 03, 2017 10:01 am
Forum: PHP General
Topic: PHP Notice: Undefined index:
Replies: 1
Views: 3327

Re: PHP Notice: Undefined index:

The tutorial you're following is either very old or very bad. Probably both.

You should focus on learning basic PHP syntax and logic first and then move straight over to using a framework where common things like logins have already been done for you.
by thinsoldier
Sun Dec 03, 2017 9:48 am
Forum: PHP General
Topic: advantages and disadvantage of not using CMS in developing website
Replies: 4
Views: 1961

Re: advantages and disadvantage of not using CMS in developing website

It all depends on the client. I've seen clients spend big money on a 100% custom CMS tailored to some aspect of their business. Less than 12 months later nobody at the company is using it. 6 months after that somebody at the company is calling me telling me to update their site as if they forgot the...
by thinsoldier
Sun Dec 03, 2017 9:29 am
Forum: PHP General
Topic: Paypal IPN Help. Sending file attachments through email
Replies: 1
Views: 277

Re: Paypal IPN Help. Sending file attachments through email

When you hire someone, always get as many ways to contact them as possible. I know someone who had to hire a private investigator to find the designer that created his company's branding. He had lost all his files. The company the designer used to work for had lost all their files too. The only hope...
by thinsoldier
Sat Dec 02, 2017 7:04 pm
Forum: PHP coding => General
Topic: Please help me understand... comment this code completely
Replies: 4
Views: 350

Re: Please help me understand... comment this code completely

VinceGledhill wrote:
Mon Nov 06, 2017 3:37 am
Thanks for that.

When I've visited forums in the past, I've usually gotten help.

Guess I made a mistake coming to this one.
Image
by thinsoldier
Sat Dec 02, 2017 6:59 pm
Forum: PHP coding => General
Topic: Issue with notifications when data added to table
Replies: 2
Views: 204

Re: Issue with notifications when data added to table

foreach ($_POST['_RecipientEmail'] as $key => $recipientemail) So $_POST['_RecipientEmail'] is an array containing more arrays? for ($i=0; $i<count($recipientemail); $i++) $to = $recipientemail; Makes me think it is an array containing more arrays because the value of each $key ($recipientemail) wo...
by thinsoldier
Sat Dec 02, 2017 6:36 pm
Forum: PHP coding => General
Topic: Drop Down Lists on each PHP Table Row
Replies: 3
Views: 239

Re: Drop Down Lists on each PHP Table Row

benanamen wrote:
Thu Nov 30, 2017 9:31 am
Feel free to post your code. We cant see your screen.
Honestly, sometimes I'd rather see a screenshot with scribbled notes and shapes trying to represent what they wish it looked like. Much easier to understand than most of the posts I've looked at so far.
by thinsoldier
Sat Dec 02, 2017 6:33 pm
Forum: PHP General
Topic: Shouldn't most of the stuff in here be under PHP Coding => General instead?
Replies: 1
Views: 181

Re: Shouldn't most of the stuff in here be under PHP Coding => General instead?

wtf? every post has hundreds of views but only 1 or 2 or zero replies!
by thinsoldier
Sat Dec 02, 2017 6:29 pm
Forum: PHP General
Topic: div content inside echo function
Replies: 1
Views: 382

Re: div content inside echo function

I want a Red Ryder BB Gun
by thinsoldier
Sat Dec 02, 2017 6:23 pm
Forum: PHP General
Topic: Can I link a drop down to a single database entry please?
Replies: 1
Views: 465

Re: Can I link a drop down to a single database entry please?

First. Stop using the phrases "drop down" and "drop menu". Makes me suspect you don't actually know which html elements are involved in the user interface / interaction you are trying to make. If your search results are coming from a database then each one should have a unique identifier ( id ). You...
by thinsoldier
Sat Dec 02, 2017 6:15 pm
Forum: PHP General
Topic: Php Inbox window for address!
Replies: 6
Views: 409

Re: Php Inbox window for address!

I think they want a form where they can paste in a path to a file on the server (hopefully not a url).
by thinsoldier
Sat Dec 02, 2017 6:12 pm
Forum: PHP General
Topic: Shouldn't most of the stuff in here be under PHP Coding => General instead?
Replies: 1
Views: 181

Shouldn't most of the stuff in here be under PHP Coding => General instead?

Shouldn't most of the stuff in here be under PHP Coding => General instead?
by thinsoldier
Sat Dec 02, 2017 6:09 pm
Forum: PHP General
Topic: Importing information from MySQL
Replies: 3
Views: 823

Re: Importing information from MySQL

when i try to import the username from the database using Are you trying to say "when I try to echo the username from the session" ? Because that's what all your code examples are showing. If those values are coming from the database, there is somewhere in the code that is adding username to the se...
by thinsoldier
Sat Dec 02, 2017 6:08 pm
Forum: PHP General
Topic: Importing information from MySQL
Replies: 3
Views: 823

Re: Importing information from MySQL

when i try to import the username from the database using Are you trying to say "when I try to echo the username from the session" ? Because that's what all your code examples are showing. If those values are coming from the database, there is somewhere in the code that is adding username to the se...
by thinsoldier
Sat Dec 02, 2017 5:59 pm
Forum: PHP General
Topic: Need a method of using results in MANY places
Replies: 1
Views: 495

Re: Need a method of using results in MANY places

If you can't be bothered to fix your [ code ] syntax error in your forum post, people will be less likely to help you out. $result1 = mysqli_query($con,$sql1); $result2 = mysqli_query($con,$sql1); Are all 8 using exactly the same $con connection and exactly the same $sql1 text? I'm going to assume t...
by thinsoldier
Sat Dec 02, 2017 5:43 pm
Forum: PHP General
Topic: Help me understand flow control!
Replies: 4
Views: 654

Re: Help me understand flow control!

Your code would produce something like this which is completely invalid HTML. Message succesfully sent!<html> <body> <form action = "dash.php" method ="POST"> <input type ="submit" value="Go back"> </form> </body> </html> No text should be sent out before the <html> tag. Your html document should al...
by thinsoldier
Sat Dec 02, 2017 5:38 pm
Forum: PHP General
Topic: Help me understand flow control!
Replies: 4
Views: 654

Re: Help me understand flow control!

However, I have been reading a lot of examples and other scripts containing html code, and they always add the html code at the bottom AFTER the php script. So when I read these, I get absolutely lost on what executes first; the php script or the html code. If you look closely most likely what they...
by thinsoldier
Sat Dec 02, 2017 5:23 pm
Forum: PHP General
Topic: Help me understand flow control!
Replies: 4
Views: 654

Re: Help me understand flow control!

Are you not using an editor with syntax highlighting? Are you not using an IDE smart enough to spot broken php code and warn you? I have added comments pointing out properly paired { and } and incorrect } that don't pair up. <?php $sql = "INSERT INTO mail (MID,SUBJECT,MSG,SENDER,RECEIVER,STATUS,UID)...
by thinsoldier
Sat Dec 02, 2017 5:14 pm
Forum: PHP General
Topic: VisualCode SVN
Replies: 2
Views: 600

Re: VisualCode SVN

I have no suggestions.

If possible consider converting your svn repos to git or consider using git-svn which allows you to use git 90% of the time and all your git activities are reproduced in the original svn repo as well.
by thinsoldier
Sat Dec 02, 2017 5:12 pm
Forum: PHP General
Topic: PHP without dollar signs :)
Replies: 1
Views: 454

Re: PHP without dollar signs :)

https://php.earth/docs/intro/dollar-sign I have a hard time decoding code that doesn't clearly indicate what words are variables. I'm slightly colorblind so syntax highlighting doesn't help me much. I can understand getting rid of $ but getting rid of "this"? How do tell the object's id property fro...
by thinsoldier
Sat Dec 02, 2017 3:59 pm
Forum: PHP General
Topic: Find the lowest value from an array
Replies: 2
Views: 271

Re: Find the lowest value from an array

Use json_decode to convert the json string into a php array. http://php.net/json_decode Loop through the array and create a new array where "5059844" etc are the key and the "level" is the value. Sort that new array by its value. http://php.net/asort Get the first (or last) element in that array htt...
by thinsoldier
Sat Dec 02, 2017 3:47 pm
Forum: PHP General
Topic: I Need help with converting mysql_escape_string() into mysqli_real_escape_string()
Replies: 4
Views: 288

Re: I Need help with converting mysql_escape_string() into mysqli_real_escape_string()

I am sympathetic to your plight "visitor52", but benanamen is correct. If I was really really bored and you had posted at least some code changes that you had tried on your own I might have held your hand as you fixed it yourself. If you are not going to try to write any code yourself, nobody will h...
by thinsoldier
Sat Dec 02, 2017 3:23 pm
Forum: PHP coding => General
Topic: How to run website on local machine
Replies: 4
Views: 300

Re: How to run website on local machine

I'm somone who used to be very afraid of the terminal and Linux up until around 1 year ago (after an embarassingly long time of building php websites without knowing that stuff). I say jump in at the deep end. Install Virtual Box and Vagrant. Follow the installation and setup guides provided by plac...