Search found 728 matches

by hyper
Tue Oct 09, 2018 7:43 am
Forum: PHP General
Topic: include jquery libray in php file
Replies: 3
Views: 70

Re: include jquery libray in php file

I thought that because the css file url was enclosed in a php tag that my jquery file reference also needs to be enclosed in a php tag? Neither needs to be output from PHP, and the css does not need to have 'http://' infront of it, in fact it would be better if it didn't unless you are using styles...
by hyper
Mon Oct 08, 2018 2:37 pm
Forum: PHP General
Topic: include jquery libray in php file
Replies: 3
Views: 70

Re: include jquery libray in php file

Why are you using a function? What's wrong with just putting this in your page? <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> or even: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> I'm assuming that your url_for fu...
by hyper
Sun Oct 07, 2018 12:59 pm
Forum: PHP General
Topic: Can't DELETE a record in a database.
Replies: 9
Views: 390

Re: Can't DELETE a record in a database.

I've been using HTMLTidy to check my code, but it can't check for missing code.
HTMLTidy, only checks html, not PHP; and as you say it can't check code that isn't there :D
by hyper
Sun Oct 07, 2018 12:51 pm
Forum: PHP General
Topic: Can't DELETE a record in a database.
Replies: 9
Views: 390

Re: Can't DELETE a record in a database.

Most of what you have learned from your book will not be a complete waste of time, to update a bit use this as a html template: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Your page title here</title> <link href='style.css' rel='stylesheet'> </head> <body> <!-- All of your ...
by hyper
Fri Oct 05, 2018 7:38 am
Forum: PHP General
Topic: Can't DELETE a record in a database.
Replies: 9
Views: 390

Re: Can't DELETE a record in a database.

I've reformatted your code to show why the delete SQL is "not working" if($Delete == 1) { $sql = "DELETE FROM members_2018 WHERE Rcd=$Recrd"; print "Deleting record $Recrd"; # Where's the database query? } else { $sql = "UPDATE members_2018 SET Forename='$Forename', Surname='$Surname', Status='$Stat...
by hyper
Thu Oct 04, 2018 9:55 am
Forum: PHP General
Topic: Can't DELETE a record in a database.
Replies: 9
Views: 390

Re: Can't DELETE a record in a database.

I don't know how to set up error reporting.
Look at the link I provided.

Show more of your code to include the prepare and execute statements.
by hyper
Tue Oct 02, 2018 11:45 am
Forum: PHP General
Topic: Can't DELETE a record in a database.
Replies: 9
Views: 390

Re: Can't DELETE a record in a database.

If I try running the query in phpMysql it asks if I really want to delete the record before it does it. I can insert records and change records in both but deleting is ignored. Do you have a foreign key constraint? Is this happening when I run the PHP, but I don't see the message? No, because PHP d...
by hyper
Fri Sep 28, 2018 1:16 pm
Forum: PHP General
Topic: PHP & MySQL Forms - Newb
Replies: 1
Views: 73

Re: PHP & MySQL Forms - Newb

Learn how to interact securely with html forms. I'm sure Joomla will have some sort of plugin that allows secure interaction with your database. I've no idea what d w c c is, but no it's not worth £128 since it's something you should be able to do yourself, so long as you have not been stretching th...
by hyper
Sun Sep 02, 2018 7:09 am
Forum: PHP coding => Images
Topic: Imagick class / method problems
Replies: 1
Views: 575

Re: Imagick class / method problems

do I have a REALLY old Imagick install on my hosting company's server?
Try phpinfo or or try looking here then look at Imagicks website to see what the latest version is and then maybe also check out WPs version information.

If all else fails: try here; it didn't work for me though.
by hyper
Mon Aug 13, 2018 9:16 am
Forum: PHP coding => General
Topic: override div in extended class
Replies: 2
Views: 192

Re: override div in extended class

Just show an itemised bill using a well designed display, i.e. items, sub total (maybe), post, tax and total; it gets too confusing otherwise.
by hyper
Tue Aug 07, 2018 7:31 am
Forum: mySQL & php coding
Topic: connecting to my database
Replies: 4
Views: 238

Re: connecting to my database

What errors are you getting?
by hyper
Sat Aug 04, 2018 3:05 am
Forum: PHP General
Topic: [HELP] I want to make 1 php registration site
Replies: 1
Views: 166

Re: [HELP] I want to make 1 php registration site

That's very nice and thoughtful of you, start here good luck :D
by hyper
Sat Aug 04, 2018 2:59 am
Forum: PHP coding => Images
Topic: thumbnails
Replies: 1
Views: 199

Re: thumbnails

Have you looked in your thumbs directory to see that you have created one successfully? Your test: if(file_exists("./thumbs/{$image}")) to see if the file exists will still try to output a link to the image that you are trying to display, is this supposed to do something else? chdir("uploads"); This...
by hyper
Mon Jul 30, 2018 10:11 am
Forum: PHP General
Topic: php and html
Replies: 2
Views: 202

Re: php and html

Your code needs to be in the correct folder and will probably need the .php extension.

You should have received instructions when you loaded your server software (apache?) where to put your files.
by hyper
Wed Jul 25, 2018 2:38 pm
Forum: PHP coding => General
Topic: == not working
Replies: 4
Views: 264

Re: == not working

Do you have error messages on display? if so what errors are you getting, if not - turn them on and see what messages you get.

Are you entering "vivek" in lower case?

Is your form method post?
by hyper
Sun Jul 22, 2018 3:25 pm
Forum: PHP Installation
Topic: Can't access php forums after installing WordPress and Deprecated error
Replies: 1
Views: 167

Re: Can't access php forums after installing WordPress and Deprecated error

Stop displaying error messages (in your php.ini file) and make the changes to your code before the deprecated code stops your site working altogether.
by hyper
Sun Jul 22, 2018 3:19 pm
Forum: PHP coding => General
Topic: Parse Error
Replies: 4
Views: 224

Re: Parse Error

by hyper
Sun Jul 22, 2018 2:10 am
Forum: PHP coding => General
Topic: Parse Error
Replies: 4
Views: 224

Re: Parse Error

This is probably the line that's giving the problem:

Code: Select all

  public function weight_kg() {
    return number_format($this->weight_kg, 2) . ' kg';
  }
It would be helpful to post the whole error message which includes the line number and normally the variable that it's referring to.
by hyper
Sat Jul 21, 2018 8:07 am
Forum: PHP coding => General
Topic: sending data from one page to other
Replies: 3
Views: 200

Re: sending data from one page to other

Try using <button>
by hyper
Mon Jul 02, 2018 8:33 am
Forum: JavaScript
Topic: Populate multiple fields by checkbox
Replies: 4
Views: 267

Re: Populate multiple fields by checkbox

If you must do it the way you have stated, then you are making hard work for yourself. What would be wrong with the following? <form method="post" id="invoices" action="process_invoices.php"> <fieldset> <legend>Select invoices you want to pay</legend> <input type="checkbox" id="iv01" name="iv01" val...
by hyper
Sun Jul 01, 2018 1:26 pm
Forum: JavaScript
Topic: Populate multiple fields by checkbox
Replies: 4
Views: 267

Re: Populate multiple fields by checkbox

How do I do this??
I'm wondering why you would want to put all the details in hidden fields???

Simply process the details server side, and if you want to have a total for the user to see - use a visible form, otherwise there's no need.

Do not rely on client supplied data as it can be faked.
by hyper
Thu Jun 28, 2018 3:10 pm
Forum: PHP General
Topic: SendGrid
Replies: 4
Views: 233

Re: SendGrid

Follow the installation and usage instructions.
by hyper
Thu Jun 28, 2018 3:08 pm
Forum: PHP coding => Images
Topic: Display error message on website page
Replies: 8
Views: 405

Re: Display error message on website page

But, it caused a lot of syntax errors. Can you lead me a little further? Fix the syntax errors and learn from the experience, forms can get quite complex to deal with, you might be better off taking a step back and looking at the basics of PHP before you try to tackle something which can destroy yo...