Search found 973 matches

by hyper
Mon Mar 30, 2020 7:41 am
Forum: PHP General
Topic: Updating from PHP 7.1 to PHP 7.3
Replies: 1
Views: 11

Re: Updating from PHP 7.1 to PHP 7.3

You'll have to read the notes to decide if anything will affect your set up. Migrating from PHP 7.1.x to PHP 7.2.x Migrating from PHP 7.2.x to PHP 7.3.x If you use anything which has been removed - for instance each() - you will get stuck. No one can say for certain if an upgrade will be alright for...
by hyper
Sat Mar 28, 2020 3:57 pm
Forum: PHP coding => General
Topic: PHP retaining selection from database in multiselect list
Replies: 1
Views: 24

Re: PHP retaining selection from database in multiselect list

You overwrite the $selected variable on each iteration of the while loop.

And if you look at the html source in your browser, you'll see where that is wrong.
by hyper
Fri Mar 27, 2020 11:59 am
Forum: PHP coding => General
Topic: PHP drop down menus
Replies: 1
Views: 30

Re: PHP drop down menus

$_POST['options'] should contain the selected option.
by hyper
Fri Mar 27, 2020 9:08 am
Forum: PHP coding => General
Topic: OR statement with multiple AND statements
Replies: 2
Views: 31

Re: OR statement with multiple AND statements

What is being checked in your script is if the values have been set in the $_SESSION variable, not their values. how do I code this so it evaluates whether locked card or locked paypal are either NOT a 1 or ARE a 0? ($_SESSION['lockedcard']===0) Note the triple equals. This will evaluate to true if ...
by hyper
Fri Mar 27, 2020 8:49 am
Forum: PHP coding => General
Topic: Problems with arrays
Replies: 1
Views: 33

Re: Problems with arrays

You're inserting $item into the $ja array at the next slot (possibly 0?) so you need to change your syntax accordingly, var_dump($ja) and you'll see what syntax to use.
by hyper
Fri Mar 27, 2020 8:38 am
Forum: PHP coding => General
Topic: How to insert an HTML form field type=date into MySQL db with PHP?
Replies: 2
Views: 35

Re: How to insert an HTML form field type=date into MySQL db with PHP?

Your code at this line:

Code: Select all

$query = " INSERT INTO crm_contacts ($fld_n10) VALUES ('$fld_c10')";
has quotation marks around $fld_c10.

What errors are you getting?
by hyper
Thu Mar 26, 2020 10:02 am
Forum: mySQL & php coding
Topic: how to fix?
Replies: 1
Views: 26

Re: how to fix?

mysql_connect is no longer available from PHP version 7, the preferred connection method is PDO
by hyper
Wed Mar 25, 2020 8:13 am
Forum: PHP coding => General
Topic: PHP $this->_vars['HTML'] unknown missing value [closed]
Replies: 3
Views: 35

Re: PHP $this->_vars['HTML'] unknown missing value [closed]

Have you checked and rectified your PHP code?
by hyper
Wed Mar 25, 2020 8:12 am
Forum: PHP coding => Mail
Topic: How to merge mail.php into my index.php
Replies: 5
Views: 49

Re: How to merge mail.php into my index.php

check if the form has been filled in Check that the data supplied is of the correct format so that you don't let any bad code get executed on your server. If the form has been filled in then you send the email otherwise you offer the form up along with any entered details that are incorrect with a ...
by hyper
Tue Mar 24, 2020 8:37 am
Forum: PHP coding => General
Topic: PHP $this->_vars['HTML'] unknown missing value [closed]
Replies: 3
Views: 35

Re: PHP $this->_vars['HTML'] unknown missing value [closed]

Change the name of the file to the correct name, or create it.
by hyper
Tue Mar 24, 2020 8:36 am
Forum: PHP coding => Mail
Topic: How to merge mail.php into my index.php
Replies: 5
Views: 49

Re: How to merge mail.php into my index.php

You need to do the PHP first so that you can check if the form has been filled in and that the data supplied is of the correct format so that you don't let any bad code get executed on your server. If the form has been filled in then you send the email, otherwise you offer the form up along with any...
by hyper
Mon Mar 23, 2020 12:43 pm
Forum: PHP coding => General
Topic: FATAL ERROR $THIS->
Replies: 3
Views: 53

Re: FATAL ERROR $THIS->

I agree with strider, but can suggest that you use a php checker as you have several basic errors which make it look a lot like JavaScript.
by hyper
Mon Mar 23, 2020 12:27 pm
Forum: PHP coding => General
Topic: Problem with data pagination
Replies: 5
Views: 225

Re: Problem with data pagination

Code: Select all

<form method="post">
...
if($_GET['pagina']
...
$inicio = ($_GET['pagina'] - 1) * $registrosPorPag;

Also put your html (not including the php as in the source from your browser) through a checker like the The W3C validator
by hyper
Sun Mar 22, 2020 4:28 pm
Forum: PHP Installation
Topic: Need help - when I click on .php file it downloads instead of opening
Replies: 5
Views: 66

Re: Need help - when I click on .php file it downloads instead of opening

It still downloads if I right click and tell it to open the php file in the browser. Your browser doesn't realise you want Apache 2 to process the file, you need to enter the address in the browser address bar using something like 'http://localhost/my.php' so that it uses the hypertext protocol (ht...
by hyper
Sun Mar 22, 2020 8:25 am
Forum: PHP Installation
Topic: Need help - when I click on .php file it downloads instead of opening
Replies: 5
Views: 66

Re: Need help - when I click on .php file it downloads instead of opening

Remember that your question makes sense to you, but things like It didn't do this prior to the install makes me start thinking along different lines to what's going on, looking for what has changed to break it. Which Linux system are you running? How did you try to execute your .php file? Did you tr...
by hyper
Sat Mar 21, 2020 5:08 pm
Forum: PHP Installation
Topic: Need help - when I click on .php file it downloads instead of opening
Replies: 5
Views: 66

Re: Need help - when I click on .php file it downloads instead of opening

You need to have PHP installed.

Did you have PHP installed before you installed Apache 2 and phpMyAdmin?
by hyper
Fri Mar 20, 2020 12:42 pm
Forum: mySQL & php coding
Topic: Header() not redirecting
Replies: 3
Views: 58

Re: Header() not redirecting

What is the name of the different page that it goes to? In you script, you have provided header() with a relative path 'welcome.php' which will open the file in the same folder, if you want to direct to the web site root, then you should have used a slash '/welcome.php' Incidentally, you had 104 vie...
by hyper
Wed Mar 18, 2020 5:37 pm
Forum: PHP coding => General
Topic: Problem with data pagination
Replies: 5
Views: 225

Re: Problem with data pagination

Have you used something like $_GET['pagina']?
by hyper
Tue Mar 17, 2020 9:05 am
Forum: PHP coding => General
Topic: Show result of columns
Replies: 2
Views: 107

Re: Show result of columns

Change the SQL to read those values from your database rather selecting everything.
by hyper
Mon Mar 16, 2020 8:50 am
Forum: JavaScript
Topic: getElement in Loop
Replies: 1
Views: 63

Re: getElement in Loop

Are you expecting your JavaScript to update the database (because it won't)? If not, are you sure that the database has been updated (you haven't shown any code for this)? Have you checked to see if the data is in your HTML source code (your HTML is not formed correctly from what you have posted, an...
by hyper
Sun Mar 15, 2020 2:38 am
Forum: PHP coding => General
Topic: My PHP needs a slight edit, AS to JS
Replies: 3
Views: 153

Re: My PHP needs a slight edit, AS to JS

You have a few issues with your code; $ToEmail = $_POST["ToEmail"]; By doing this, you allow multiple e-mail addresses to be inserted by simply providing a comma separated list since the mail() command is quite happy to accept this. I see no reason to use JavaScript in any way shape or form in what ...
by hyper
Sat Mar 14, 2020 5:50 am
Forum: PHP coding => General
Topic: cron on localhost perfectly works but not in online(mysite.com/cron)[Laravel]
Replies: 3
Views: 139

Re: cron on localhost perfectly works but not in online(mysite.com/cron)[Laravel]

hPanel then

The server doesn't look for a file or folder called cron unless there is a cron job which does that, your localhost probably has this so that the script looks in the folder for you.
by hyper
Fri Mar 13, 2020 10:11 am
Forum: PHP coding => General
Topic: PHP game has suddenly stopped working.
Replies: 7
Views: 176

Re: PHP game has suddenly stopped working.

Sorry, in my efforts to keep it simple I neglected to mention about the header(). In your listing, you have a header() after outputting: <!DOCTYPE html> <html> <head> </head> <body> That constitues output, followed by the die(header('location:index.php')); What you can do is output after you have do...