Search found 696 matches

by hyper
Fri Jun 22, 2018 10:51 am
Forum: PHP coding => General
Topic: Multidimensional array
Replies: 2
Views: 43

Re: Multidimensional array

The first listing is incorrect for PHP, I think that you're correct that the second listing is what was intended.
by hyper
Fri Jun 22, 2018 12:58 am
Forum: PHP coding => General
Topic: Code Editor
Replies: 2
Views: 26

Re: Code Editor

Also i was wondering why is it that every time i create a new project in netbeans 8.0.2 it opens every project in the directory? Because you told it to when you opened the project; that's how IDEs they work by reading all the files in the chosen directory and below; select only the project folder (...
by hyper
Sun Jun 03, 2018 5:20 am
Forum: PHP coding => General
Topic: Form to sending emails with file attachment - problem
Replies: 4
Views: 140

Re: Form to sending emails with file attachment - problem

On form submission, your script attempts to send the email even where validation errors have occurred. To debug, I would take out the file uploading until you have the basics worked out. Your function comments out the return: #return $form_data; I have to ask: $toEmail = some@email.com I presume is ...
by hyper
Sat Jun 02, 2018 11:59 am
Forum: PHP coding => General
Topic: Form to sending emails with file attachment - problem
Replies: 4
Views: 140

Re: Form to sending emails with file attachment - problem

What looks to be working? (what is it doing?)

What PHP error messages are you getting?
by hyper
Mon May 28, 2018 8:02 am
Forum: PHP coding => General
Topic: php post array process non-input text references
Replies: 5
Views: 174

Re: php post array process non-input text references

This raises havoc with my css grid forcing a null column (thus screwing up my justify-content), but appears to be the least painful. And, alas, it does require repeating my database query after the post. Don't put the hidden field in a span tag, the input maybe hidden, but the span isn't. This is a...
by hyper
Mon May 28, 2018 2:39 am
Forum: PHP General
Topic: session value at any moment
Replies: 5
Views: 219

Re: session value at any moment

You only need to follow the link that I provided.

If you explain what you are trying to do, we might be able to help more.
by hyper
Mon May 28, 2018 2:34 am
Forum: PHP coding => General
Topic: php post array process non-input text references
Replies: 5
Views: 174

Re: php post array process non-input text references

In that case, create a temporary holding area for the information until all of the information is available to generate the invoice. An invoice should be final, any amendments to it should only be using other documents (credits etc..) I wouldn't / haven't / don't generate an invoice until I have all...
by hyper
Sat May 26, 2018 7:24 am
Forum: PHP coding => General
Topic: php post array process non-input text references
Replies: 5
Views: 174

Re: php post array process non-input text references

I cannot assume the database table will remain unchanged, so repeating the query is not an option creating and unenable-ing form input array fields on the row to hold the key information seems awkward, rendering an array to $_SESSION for this purpose appears to be the best of the bad options Are al...
by hyper
Wed May 23, 2018 3:17 pm
Forum: PHP coding => General
Topic: custom wordpress plugin code
Replies: 3
Views: 111

Re: custom wordpress plugin code

It looks to be JQuery script which is why you got an error trying to parse it as PHP.

What did the instructions that came with the script tell you to do?
by hyper
Mon May 21, 2018 12:39 pm
Forum: PHP General
Topic: session value at any moment
Replies: 5
Views: 219

Re: session value at any moment

It's an online manual
by hyper
Sun May 20, 2018 1:20 am
Forum: PHP coding => General
Topic: auto increment value inserted to two db tables
Replies: 6
Views: 172

Re: auto increment value inserted to two db tables

Look at your data: you have duplicated username and password in both tables you have contact information in the repairs table you already have a memberID, use that to get your data is customer_ref for your information or their information? could you have different technicians working on different or...
by hyper
Sat May 19, 2018 12:07 pm
Forum: PHP coding => General
Topic: auto increment value inserted to two db tables
Replies: 6
Views: 172

Re: auto increment value inserted to two db tables

I think that you're trying to do too much in one go, have you created the database and tables?

I think that you'll a few more tables and look a bit more in depth at your data requirements.
by hyper
Sat May 19, 2018 10:38 am
Forum: PHP coding => General
Topic: auto increment value inserted to two db tables
Replies: 6
Views: 172

Re: auto increment value inserted to two db tables

Have you tried it?

What happens when you try?

Stating the obvious: Don't try it on a live database.

If it does work, are you sure that it will solve your problem?
by hyper
Sat May 19, 2018 9:33 am
Forum: mySQL & php coding
Topic: new version of PHP got me..
Replies: 4
Views: 191

Re: new version of PHP got me..

Sorry, I didn't realise, that's where using code tags comes in handy.

try using var_dump after the fetch:

Code: Select all

$rowAccount=mysqli_fetch_array($result);
var_dump($rowAccount);
See what is actually returned from the fetch.

Have you checked your error logs?
by hyper
Sat May 19, 2018 7:24 am
Forum: PHP coding => General
Topic: Usage of __DIR__ constant
Replies: 1
Views: 77

Re: Usage of __DIR__ constant

If I understand correctly, the __DIR__ "knows" where the including file is located __DIR__ knows which directory the currently executing file is located. so that if I move the file to a new directory it should work without updating the code. No, you need to change your include statement, the server...
by hyper
Fri May 18, 2018 11:53 pm
Forum: PHP coding => General
Topic: Fatal Error with initial example of sms platform attempt
Replies: 1
Views: 72

Re: Fatal Error with initial example of sms platform attempt

Have you checked that you followed all of the installation instructions?

As the error message states, it cannot find the 'autoload.php' file, so you need to change the path in this line:

Code: Select all

require_once '../vendor/autoload.php';
so that it can find it
by hyper
Fri May 18, 2018 11:45 pm
Forum: PHP coding => General
Topic: How to display current logged information
Replies: 1
Views: 110

Re: How to display current logged information

however it is displaying EVERYBODIES details It is returning what you have asked for, change the SQL, and I strongly recommend using prepared statements while you go about making your changes, the point in using prepared statements was to improve security. $stmt = $con->prepare("SELECT *FROM Users"...
by hyper
Fri May 18, 2018 11:36 pm
Forum: mySQL & php coding
Topic: new version of PHP got me..
Replies: 4
Views: 191

Re: new version of PHP got me..

MySQL functions are deprecated

Code: Select all

mysql_connect("$host", "$username", "$password",)or die("cannot connect");
, so all of your function calls need to be changed, I suggest you change to PDO.

If your other sites already use PDO or MySQLi, you shouldn't have any problems changing.
by hyper
Thu May 17, 2018 8:06 am
Forum: PHP coding => General
Topic: php pdo mysql id to two different tables help
Replies: 3
Views: 124

Re: php pdo mysql id to two different tables help

Maybe a bit late, but if you have 2 tables: repairs: memberID, jobID members: memberID, username, password Then all you need to do is $db->prepare('SELECT jobID FROM repairs WHERE memberID = ?'); You might want to add more fields for date, phone number, maybe a description of the repair etc..? but t...
by hyper
Sun May 13, 2018 11:50 am
Forum: PHP coding => General
Topic: PHP Warning: Declaration
Replies: 8
Views: 255

Re: PHP Warning: Declaration

PHP can't find 'ttfonts.php', your path is wrong.
by hyper
Sun May 13, 2018 12:22 am
Forum: mySQL & php coding
Topic: PHP Registration accepts SAME USERNAME and EMAIL in uppper and lower case
Replies: 1
Views: 106

Re: PHP Registration accepts SAME USERNAME and EMAIL in uppper and lower case

This is deliberate behaviour, the letters 'A' and 'a' are not the same in computers as it needs to know if you want an upper case letter or lower case letter. The easiest way is to use either strtoupper or strtolower to change the input; or you can use PDO or SQL to do it when you insert into the da...
by hyper
Sat May 12, 2018 7:33 am
Forum: PHP coding => General
Topic: Permission Denied When Using fopen
Replies: 1
Views: 94

Re: Permission Denied When Using fopen

You'll need to contact your college admin to get permissions changed or change the user that PHP runs under.
by hyper
Sat May 12, 2018 2:32 am
Forum: PHP General
Topic: Parsing a binary file
Replies: 1
Views: 84

Re: Parsing a binary file

fread can open binary files , then I think you are looking for unpack to translate the data and the pack page will give you the data type codes. PHP tries to avoid binary data since it is largely machine dependant and portability is the goal. Using binary formats could lead to problems at a later d...