Search found 529 matches

by hyper
Sun Dec 17, 2017 7:05 pm
Forum: mySQL & php coding
Topic: What's wrong here?
Replies: 3
Views: 16

Re: What's wrong here?

I assume from your response that you didn't read the link I provided, I'm afraid that it's going to involve a lot of reading and re-writing on your part. I'm willing to help, but not willing to do all the work for you - if you want someone to do all the translation for you you might have to consider...
by hyper
Sun Dec 17, 2017 4:21 pm
Forum: PHP General
Topic: Insert a converted php array in a JS Object
Replies: 1
Views: 16

Re: Insert a converted php array in a JS Object

You'll need to provide more code; from what you have shown, you're mixing JavaScript and PHP.

Use the code blocks button </> when posting code.
by hyper
Sun Dec 17, 2017 4:12 pm
Forum: mySQL & php coding
Topic: What's wrong here?
Replies: 3
Views: 16

Re: What's wrong here?

What version of PHP are you running?

I suspect that it has been upgraded to PHP 7, if so you will have to re-code your scripts since the database function calls you are using have been deprecated for several years and have now been removed from PHP 7.
by hyper
Thu Dec 14, 2017 8:06 am
Forum: PHP coding => General
Topic: php header function seems to replace # character
Replies: 2
Views: 37

Re: php header function seems to replace # character

Something is converting your hash into an ascii code, I suspect that this is a safety / security thing. PHP doesn't do that unless you tell it explicitly, the server software on the other hand might in an .htaccess file. I don't use Wordpress, but this would seem to me to be the culprit, in which ca...
by hyper
Mon Dec 11, 2017 4:20 pm
Forum: PHP General
Topic: Encoding Issue?
Replies: 2
Views: 43

Re: Encoding Issue?

Where's the code you used?
by hyper
Sun Dec 10, 2017 11:36 am
Forum: PHP coding => Mail
Topic: Contact form not working
Replies: 6
Views: 69

Re: Contact form not working

Was the blank page with the error checking? I've been trying to avoid saying the following, but it might be your best bet rather than trying to fix what you have: It may be worth you looking at using PHPMailer (there are some youtube videos which may help) or SwiftMailer . And it wouldn't hurt to re...
by hyper
Sun Dec 10, 2017 9:38 am
Forum: mySQL & php coding
Topic: Insert data to database using loop that separated by comma
Replies: 3
Views: 59

Re: Insert data to database using loop that separated by comma

I was under the impression you wanted some help, if you had said from the start that you wanted someone to spend a lot of time and effort asking more questions about what you wanted and then expecting them to write a script to do it, I could have ignored your post completely. The simple way to do it...
by hyper
Sun Dec 10, 2017 1:23 am
Forum: PHP coding => General
Topic: Having problems reading from a mysql table in php
Replies: 1
Views: 46

Re: Having problems reading from a mysql table in php

SQL does more than just: SELECT * FROM All your posts indicate that you are jumping from one thing to another because it "does not work" or you don't understand it; take your time and learn something before moving on to the next instead of trying to make hard work of everything. Try this for starter...
by hyper
Sat Dec 09, 2017 10:39 am
Forum: PHP coding => Mail
Topic: Contact form not working
Replies: 6
Views: 69

Re: Contact form not working

Put these two lines at the start of your script:

Code: Select all

error_reporting(E_ALL);
display_errors = on;
then read what is displayed.
by hyper
Sat Dec 09, 2017 10:20 am
Forum: PHP coding => Mail
Topic: Contact form not working
Replies: 6
Views: 69

Re: Contact form not working

eregi was removed in PHP 7 having been deprecated since version 5.3.
by hyper
Sat Dec 09, 2017 8:17 am
Forum: PHP coding => General
Topic: elseif help, newbi..
Replies: 2
Views: 54

Re: elseif help, newbi..

i can still put more than 3 characters in when i specified that !=3 is max length. Hint: any value above or below 3 is not equal to 3, so if you enter something with a length of 4... it is easy to overlook when starting out, have a look at all the maths operators. Yes, there looks to be a mix up of...
by hyper
Fri Dec 08, 2017 7:35 am
Forum: PHP coding => General
Topic: Function ported from javascript doesn't work exactly the same
Replies: 1
Views: 41

Re: Function ported from javascript doesn't work exactly the same

substr($phrase, $i, $i+1); $i starts at zero, then has 1 added to it on each iteration; do this on paper using the word "hello", so 'h' is the first letter (PHP uses zero based indexing) and is 0, 'e' is number 1, 'l' is 2 and 3, then 'o' is 4, to clarify: $i = 0: letter is 'h' $i = 1: letter is 'e...
by hyper
Mon Dec 04, 2017 10:09 am
Forum: PHP Installation
Topic: Upgrading PHP 7.0 to 7.1
Replies: 1
Views: 42

Re: Upgrading PHP 7.0 to 7.1

Yes the repository is well maintained, feel free to use it.
by hyper
Sun Dec 03, 2017 12:57 pm
Forum: PHP General
Topic: Php Inbox window for address!
Replies: 6
Views: 79

Re: Php Inbox window for address!

I think that you are trying to do more than you are capable of at this point, on the one hand you want to traverse directories, and the other you want to use html input boxes. Unless you are able to explain exactly what or how you want to do it (whatever 'it' is) I can't offer any help except to sug...
by hyper
Sun Dec 03, 2017 7:50 am
Forum: PHP General
Topic: Php Inbox window for address!
Replies: 6
Views: 79

Re: Php Inbox window for address!

How did you get on with the links I provided?
by hyper
Fri Dec 01, 2017 12:06 pm
Forum: PHP General
Topic: Php Inbox window for address!
Replies: 6
Views: 79

Re: Php Inbox window for address!

I not really sure what you are asking, however:

if you want to get all *.txt files, you can use glob

if you want to enter the name of the file, you can use an input box in a form

or you can create an array of file names
by hyper
Wed Nov 29, 2017 10:58 am
Forum: PHP coding => General
Topic: How to run website on local machine
Replies: 4
Views: 74

Re: How to run website on local machine

Your host should have instructions on how to find your root directory.

You will also need to install equivalent software that your server uses on your local machine e.g. apache, php and MySql (check before installing.)

Check what advice your host offers.
by hyper
Mon Nov 27, 2017 10:02 am
Forum: PHP coding => General
Topic: assign the contents of a file on the server to a div in my html
Replies: 3
Views: 60

Re: assign the contents of a file on the server to a div in my html

@hyper: What would stop someone from simply doing? <div><?php include "php/file.php"?></div> Surely this is much simpler than using filesystem functions, no? Nothing, it's not what the op asked read the contents of that file and then assign it to a div when I load my page Whilst it could be 'includ...
by hyper
Mon Nov 27, 2017 9:48 am
Forum: PHP coding => General
Topic: recursive function
Replies: 7
Views: 129

Re: recursive function

Excellent, well done!
by hyper
Sun Nov 26, 2017 5:17 am
Forum: PHP coding => General
Topic: assign the contents of a file on the server to a div in my html
Replies: 3
Views: 60

Re: assign the contents of a file on the server to a div in my html

read the contents of that file and then assign it to a div when I load my page. Is that possible Yes you can, read the relevant part in the php manual for how to do that. and if so, does the page that loads the file have to be a .php page or can it be a .html Depends on how your server is set up, s...
by hyper
Sun Nov 26, 2017 5:09 am
Forum: PHP coding => General
Topic: recursive function
Replies: 7
Views: 129

Re: recursive function

When $count is less than 10, the if statement calls test() again, this means that the rest of the function is not executed; this is the same as any function calling a function - execution halts until it returns from the function that it called. it's a bit like: <?php function when_0() { echo 'In whe...
by hyper
Sat Nov 25, 2017 4:32 pm
Forum: PHP coding => General
Topic: recursive function
Replies: 7
Views: 129

Re: recursive function

test() will only call itself if the value of $count is less than 10: if ($count < 10) { test(); } When the value of $count is 9, test() will call itself where $count is increased to 10, it then displays 10 and ignores the if statement since it will be false. Execution continues with the second part ...
by hyper
Sat Nov 25, 2017 4:20 pm
Forum: PHP coding => General
Topic: php function for decrementing weeks of the year
Replies: 1
Views: 32

Re: php function for decrementing weeks of the year

You need to take into account what happens when the counter reaches zero and goes into negative numbers, or you need to make sure that it doesn't happen.