Search found 1222 matches

by hyper
Sun Jul 18, 2021 7:00 am
Forum: mySQL & php coding
Topic: PHP Select option with 2 values to save into the database
Replies: 1
Views: 542

Re: PHP Select option with 2 values to save into the database

Where is the database? on the server or PC?

Where is your server side code?
by hyper
Sun Jul 18, 2021 6:56 am
Forum: PHP coding => General
Topic: Prevent Duplicate entry on form update with PDO
Replies: 6
Views: 922

Re: Prevent Duplicate entry on form update with PDO

I don't fully understand where you are going with this so I am putting a few pointers your way. Only search for duplicate entries, you don't need to loop through the results as there should only be one, as Strider says, you can assign unique to your fields and let the database do all the work for yo...
by hyper
Thu Jul 08, 2021 1:21 pm
Forum: PHP coding => General
Topic: I want to make this case sensitive and protected from injections, any help?
Replies: 1
Views: 459

Re: I want to make this case sensitive and protected from injections, any help?

If you want to check like for like, change the case to upper or lower case strtoupper or strtolower , so long as you store the password in one case or the other. That's an old script you have there, the security issue you have is the use of $password = md5($password_1); but this is a general securit...
by hyper
Mon Jul 05, 2021 2:45 am
Forum: PHP coding => General
Topic: completely new to PHP, trying to POST with cURL
Replies: 3
Views: 693

Re: completely new to PHP, trying to POST with cURL

Sorry, I didn't realise you were working on the server - leave the php.ini file alone, upload the phpinfo file to your server and execute it to find where the error_log file is and check there. You could also try to replace this line: $response = curl_exec($ch); with this if ($response = curl_exec($...
by hyper
Sun Jul 04, 2021 5:05 am
Forum: JavaScript
Topic: javascript email format validation
Replies: 2
Views: 650

Re: javascript email format validation

You don't need JavaScript, HTML already checks for you.
by hyper
Sun Jul 04, 2021 5:01 am
Forum: PHP coding => General
Topic: completely new to PHP, trying to POST with cURL
Replies: 3
Views: 693

Re: completely new to PHP, trying to POST with cURL

The easy part: Anything in the <head> (apart from <title>)section of a HTML document, will not be displayed - this part just gives information to the browser. <html> <head><!-- Start of head section --> <title>PHP test</title> <?php $ch = curl_init('https://SMSWEBSITEADDRESS....'); $data = array( 'p...
by hyper
Thu Jul 01, 2021 6:16 am
Forum: PHP coding => General
Topic: Add variable as parameter after === in php
Replies: 5
Views: 989

Re: Add variable as parameter after === in php

It looks as though you want to read about variable variables This is a very dangerous practice, especially if you are using it to check for a correct password - PHP has two functions to do this for you, password_hash and password_verify You store the password using password_hash(new_password) and th...
by hyper
Sun Jun 20, 2021 4:57 pm
Forum: PHP coding => General
Topic: Line break issue
Replies: 1
Views: 600

Re: Line break issue

Find out what is converting the line break codes into a HTML line break and work around it, try looking for 'nl2br()'.

It might be a case of 'search and replace "&lt;br&gt;" with "PHP_EOL"'.

If you're using a framework, it may be worth checking if it does this for you and find a workaround.
by hyper
Sun Jun 06, 2021 7:20 am
Forum: PHP coding => General
Topic: NESTED ARRAY HELP
Replies: 2
Views: 743

Re: NESTED ARRAY HELP

Multi dimensional arrays can get complicate quickly, they take some time to get used to. I think this is what you have asked for, but it might not be what you want / need if that makes any sense. As you rightly point out, there was no need for the count column, I'm not sure that you need a parent co...
by hyper
Tue Jun 01, 2021 11:11 am
Forum: PHP General
Topic: Add values of this api
Replies: 2
Views: 767

Re: Add values of this api

Since it sounds like the API wants a limit of 200, work with it; otherwise you run the risk of getting kicked out. Does the API already supply the information that you want? Limits are put there for a reason - spammers, people that don't know what they're doing and plain old system resources getting...
by hyper
Mon May 24, 2021 10:22 am
Forum: PHP coding => General
Topic: How to Change text echoed in div of protected function woocommerce
Replies: 2
Views: 743

Re: How to Change text echoed in div of protected function woocommerce

Delete them?

Your question isn't very clear and my answer reflects my literal understanding of it; so if the answer does not help, try rewording it and I will try again.
by hyper
Mon May 24, 2021 10:09 am
Forum: PHP coding => General
Topic: PHP7.45 does not support HTML5?
Replies: 2
Views: 755

Re: PHP7.45 does not support HTML5?

PHP 7.45, or any other version, does not care which version of HTML, CSS or JavaScript you are using. PHP runs on the server the others run on the clients device through a browser. HTML will still work to a greater or lesser degree regardless of how badly it is written and whichever version you thin...
by hyper
Mon May 24, 2021 9:59 am
Forum: PHP coding => General
Topic: Getting errors to show
Replies: 1
Views: 598

Re: Getting errors to show

Start by setting PHP to display errors [in you php.ini file]; if you have a fatal PHP error, it will exit without executing your code - display errors will say something which will help narrow down where the error is.
by hyper
Sun May 23, 2021 3:50 am
Forum: CSS
Topic: How to keep images for same height and width inside bootstrap 4.4.1 cards?
Replies: 1
Views: 747

Re: How to keep images for same height and width inside bootstrap 4.4.1 cards?

Look at your output html (view source) and check that it is correct.

If it is correct, view the page in developer tools to see where it's going wrong.
by hyper
Wed May 19, 2021 11:36 am
Forum: HTML Basics
Topic: Nav Bar
Replies: 31
Views: 7123

Re: Nav Bar

Do you get spam out of carpets, especially the smell?
by hyper
Wed May 19, 2021 11:34 am
Forum: HTML Basics
Topic: Tables to DIVs
Replies: 2
Views: 782

Re: Tables to DIVs

It's already done: <ul> <li><a href="/pages/classics.php">Classics</a></li> <li><a href="/pages/history.php">History</a></li> <li><a href="/pages/literature.php">Literature</a></li> <li><a href="/pages/nonfiction.php">Non-Fiction</a></li> </ul> Then style it using CSS. O.K., you may think - how does...
by hyper
Wed May 05, 2021 7:35 am
Forum: mySQL & php coding
Topic: Using MySQLi to connect
Replies: 9
Views: 2160

Re: Using MySQLi to connect

Most of what you already know still applies, I think CSS will be the biggest change for you. HTML provides the structure of the document - write it as though you are writing for a screen reader CSS supplies how it looks on different devices The main mind shift will be changing how you present variab...
by hyper
Tue May 04, 2021 11:42 am
Forum: mySQL & php coding
Topic: Using MySQLi to connect
Replies: 9
Views: 2160

Re: Using MySQLi to connect

You may not like this, but don't take it the wrong way. I'm not sure how to phrase the query Whatever SQL you have, will work with very few tweaks depending on how badly it was written in the first place. I'm not sure about everyone else, but, I looked at your code and thought 'this code that you ha...
by hyper
Sat Apr 17, 2021 4:50 am
Forum: PHP coding => General
Topic: When do you think PHP 5 will become totally unusable for developers?
Replies: 11
Views: 2282

Re: When do you think PHP 5 will become totally unusable for developers?

It's difficult, the main features promoted with PHP 7 are that it is more secure, but the biggest difference in my mind is the speed increase, this has got to be a big plus by reducing the processing required and stop bounces while a user gets bored waiting for a page to load. The way I see it is th...
by hyper
Fri Apr 16, 2021 9:39 am
Forum: PHP coding => General
Topic: Searching multiple criteria PHP and MySQL
Replies: 1
Views: 794

Re: Searching multiple criteria PHP and MySQL

Use the OR operator:

Code: Select all

WHERE
  state = 'QLD' 
OR
  state = 'NSW'
MySQL OR
by hyper
Sat Apr 10, 2021 8:11 am
Forum: PHP coding => General
Topic: live real time chart
Replies: 4
Views: 1382

Re: live real time chart

Ok, here's more information on AJAX for you http-equiv works so long as your page is quick at loading.
by hyper
Thu Apr 08, 2021 11:53 am
Forum: Free time
Topic: Easy Ways to Pursue Writing as a Career
Replies: 1
Views: 910

Re: Easy Ways to Pursue Writing as a Career

I want to write a tome about SPAM and its prevention, how do I start?
by hyper
Thu Apr 08, 2021 11:47 am
Forum: PHP coding => General
Topic: live real time chart
Replies: 4
Views: 1382

Re: live real time chart

Make pages work without JavaScript first. no need for JavaScript HTML was able to do this before JavaScript was thought of. <meta http-equiv="refresh" content="3;url=https://www.mozilla.org"> Just be sensible in its use. So long as your page doesn't take too long to load, there should be little to n...
by hyper
Thu Apr 08, 2021 11:45 am
Forum: PHP coding => General
Topic: Different languages in subdirectories
Replies: 1
Views: 821

Re: Different languages in subdirectories

The simplest way to do this is to use the HTML lang tag, there is probably little SEO value in doing anything else, search engines use the lang tag in the document header. <!DOCTYPE html> <html lang="en"> It is possible to use directory strucure if you really want to, but, that can be a lot of work ...
by hyper
Sat Mar 20, 2021 8:26 am
Forum: PHP Scripts
Topic: How to shorten a text?
Replies: 2
Views: 1379

Re: How to shorten a text?

What have you tried?