Search found 498 matches

by hyper
Fri Nov 17, 2017 8:47 am
Forum: PHP Installation
Topic: ODBC linux PHP Syntax error?
Replies: 8
Views: 46

Re: ODBC linux PHP Syntax error?

Ok, you are telling PHP to connect to your database here:
/var/www/html/xampp/htdocs/
PHP is saying, it isn't there; either you haven't put the database on your system, or you have put is somewhere else that php is unaware of.
by hyper
Fri Nov 17, 2017 8:44 am
Forum: PHP coding => General
Topic: Variable not working though out php mysql script
Replies: 1
Views: 17

Re: Variable not working though out php mysql script

This is really bad:

Code: Select all

$pw = md5($pw);
Do not use it any more, MD5 has been cracked and is not secure, look at the manual here for more information.


What errors are you getting?
Did your $vars work at one time and now they don't since a change was made?
by hyper
Fri Nov 17, 2017 8:32 am
Forum: mySQL & php coding
Topic: pdo mysql insert doesnt work from post form
Replies: 1
Views: 10

Re: pdo mysql insert doesnt work from post form

You do have errors in your code, so either look at your error log or switch display errors on. Apart from the errors that need to be fixed, I don't see any connection being made to the database. if($_POST) is bad practice: if ($_POST) what? Getting the first part right is fundamental to security whe...
by hyper
Thu Nov 16, 2017 11:34 am
Forum: PHP Installation
Topic: ODBC linux PHP Syntax error?
Replies: 8
Views: 46

Re: ODBC linux PHP Syntax error?

Which directory did you put your database in?
by hyper
Wed Nov 15, 2017 4:37 pm
Forum: PHP Installation
Topic: ODBC linux PHP Syntax error?
Replies: 8
Views: 46

Re: ODBC linux PHP Syntax error?

Unable to connect to data source
/var/www/html/xampp/htdocs/
This may be that your database is not in your web root directory; confirm that the database is available and that the path is correct.
by hyper
Wed Nov 15, 2017 9:55 am
Forum: PHP Installation
Topic: ODBC linux PHP Syntax error?
Replies: 8
Views: 46

Re: ODBC linux PHP Syntax error?

You have a syntax error in your index2.php file. I don't look at external links, however, there is a closing } in your file on line 47 which does not have an opening one. The errors were probably suppressed in the old set up, what you will need to do is figure out why the bracket is there and see if...
by hyper
Tue Nov 14, 2017 3:35 pm
Forum: PHP coding => General
Topic: Reading error
Replies: 1
Views: 36

Re: Reading error

Should you be checking name and course?

Code: Select all

if(trim($drop[1])==$course) { // checking if the student is already registered for the course
by hyper
Sun Nov 12, 2017 11:12 am
Forum: mySQL & php coding
Topic: pulling data from a sql database
Replies: 3
Views: 42

Re: pulling data from a sql database

O.K. you want to do this the long and hard way: The following is wrong: $auth_host = $GLOBALS['auth_host']; $auth_user = $GLOBALS['auth_user']; $auth_pass = $GLOBALS['auth_pass']; $auth_dbase = $GLOBALS['auth_dbase']; If you had error reporting set to display, you would have received a message to th...
by hyper
Sun Nov 12, 2017 3:06 am
Forum: mySQL & php coding
Topic: pulling data from a sql database
Replies: 3
Views: 42

Re: pulling data from a sql database

Does it work, or do you get errors / corrupt data.
by hyper
Sun Nov 12, 2017 3:02 am
Forum: PHP coding => General
Topic: While and If Statements
Replies: 4
Views: 41

Re: While and If Statements

What do you expect this to do?

Code: Select all

while ($line = fgets ($cfile)) {
    $drop = explode ('||', trim ($line));
 
  } 
And now having re-read it, what does it actually do?
by hyper
Fri Nov 10, 2017 7:56 am
Forum: PHP coding => Mail
Topic: PHP string no longer recognized after upgrading PHP version
Replies: 3
Views: 43

Re: PHP string no longer recognized after upgrading PHP version

Something is changing the $email variable or putting it out of scope, you need to go back up through the listing to where it is first declared and see where the variable is changed, e.g. $email = 'dorris@summer.com'; echo $email, 'line 2<br>'; .... if ($email = 'fencepost@summer.com') { // line 437 ...
by hyper
Thu Nov 09, 2017 1:46 pm
Forum: PHP coding => General
Topic: Writing in a text file
Replies: 3
Views: 43

Re: Writing in a text file

Using file_get_contents with unserialize and file_put_contents with serialize means that you don't need the loop, read the links.
by hyper
Thu Nov 09, 2017 1:37 pm
Forum: PHP coding => Mail
Topic: PHP string no longer recognized after upgrading PHP version
Replies: 3
Views: 43

Re: PHP string no longer recognized after upgrading PHP version

There's nothing wrong with the line that you have posted, try this line just before the line you posted: echo "E-mail address: $email <br>Can you see it?"; exit; and see what is displayed, then backtrace it to the problem. But really you should be upgrading a an even more recent version of PHP as th...
by hyper
Thu Nov 09, 2017 1:21 pm
Forum: phpMyAdmin
Topic: Can't access phpMyAdmin by Web
Replies: 10
Views: 108

Re: Can't access phpMyAdmin by Web

Yes, you need to have phpMyAdmin installed.
by hyper
Thu Nov 09, 2017 1:16 pm
Forum: PHP coding => General
Topic: Writing in a text file
Replies: 3
Views: 43

Re: Writing in a text file

You haven't really explained how the script is not working, however I can assume a few things and hopefully point a few things out: in enrolled.php, you write and then load the 'load.txt' file, but do not use $readin variable. Once you have found a match in the while loop, you continue to loop; you ...
by hyper
Wed Nov 08, 2017 4:19 pm
Forum: phpMyAdmin
Topic: Can't access phpMyAdmin by Web
Replies: 10
Views: 108

Re: Can't access phpMyAdmin by Web

Did you install phpMyAdmin?
by hyper
Wed Nov 08, 2017 4:13 pm
Forum: PHP coding => Images
Topic: How do I rename an image file?
Replies: 5
Views: 63

Re: How do I rename an image file?

Have you looked at the directory using a file manager?
by hyper
Wed Nov 08, 2017 10:19 am
Forum: PHP coding => Images
Topic: How do I rename an image file?
Replies: 5
Views: 63

Re: How do I rename an image file?

What return value are you getting and what errors are you getting?

I'm surprised that you still can't add code tags, or offer any useful information on your posts considering the length of time you have been here asking questions?
by hyper
Tue Nov 07, 2017 10:52 am
Forum: PHP coding => Images
Topic: How do I rename an image file?
Replies: 5
Views: 63

Re: How do I rename an image file?

What happens when you upload and rename the image?
by hyper
Tue Nov 07, 2017 10:46 am
Forum: PHP coding => General
Topic: PHP Get Download file from FTP
Replies: 1
Views: 31

Re: PHP Get Download file from FTP

What errors are you getting?
by hyper
Tue Nov 07, 2017 10:34 am
Forum: PHP coding => General
Topic: Pagination - Page Index Value
Replies: 6
Views: 61

Re: Pagination - Page Index Value

Well done Dave, thanks for letting us know and good luck with sorting it out :)
by hyper
Mon Nov 06, 2017 6:27 pm
Forum: PHP coding => General
Topic: Pagination - Page Index Value
Replies: 6
Views: 61

Re: Pagination - Page Index Value

"index" can infer different things :? You'll need to find the function write_pager() and see what's what for starters. If you just have a 12k file, it shouldn't take too long, if it's more than one file, then it might be worth using an editor that can search in all files. As this appears to be a com...
by hyper
Mon Nov 06, 2017 11:52 am
Forum: PHP coding => General
Topic: Pagination - Page Index Value
Replies: 6
Views: 61

Re: Pagination - Page Index Value

Hi Dave, You've not really given enough information: I have been asked to change the page index value on a page that has pagination. Pagination is so that the user can change the current page (the index)? write_pager() is a user defined function and not part of the PHP core. Can you clarify what you...
by hyper
Sat Nov 04, 2017 9:32 am
Forum: PHP coding => General
Topic: result showing on small browser, but not phone.
Replies: 2
Views: 38

Re: result showing on small browser, but not phone.

I suspect that it is off screen, try to determine when it disappears (by shrinking the browser size a bit at a time) and then check your css to find out why.
by hyper
Tue Oct 31, 2017 2:39 pm
Forum: phpMyAdmin
Topic: Can't access phpMyAdmin by Web
Replies: 10
Views: 108

Re: Can't access phpMyAdmin by Web

In all honesty, you're losing me with what you have done and what you want.

Please explain what you have done: e.g. installed Centos, installed lamp set up confirmed, installed joomla set up ok etc.. etc..

And then, when you realised you had a problem with phpMyAdmin.