Jump to content

Odd issue with php funtions


betaits

Recommended Posts

So basically I am very new to programming but have learned my way to a point where I have a system where if you purchase multiple online accounts on the site it will not only create a newly registered user but as many users as online accounts where created.

 

I found many security issues so I have since begun the transition to what will be an extension. I found a tutorial that would do basically exactly what I needed, I would just need to add some functions and so on.

 

Everything worked great, as a test I inserted spql queries and functions to the demo code to display a table of results. All worked fine.

 

The issue is that now I have created som new functions - basically the same as the ones that work - and if I try to call them I get a blank screen.

 

 

(Normally I go to url and it shows page in template of site with some testing echos, once I try and use my most recent functions I got a blank screen but with the echos appearing that where done before the function call.

 

Here is the function in DAL.php and the function call from a different php file.

 

public function get_last_user_created($username){

 

$sql = "SELECT * FROM ty2ox_users WHERE username = '$username'";

 

 

return $this->query($sql);

}

 

 

 

 

$lastuser = $dal->get_last_user_created($username);

 

 

Please help as this does not make any sense to me. Also any tips on making the code cleaner or better would be greatly appreciated.

postpayment.php

DAL.php

Link to comment
https://forums.phpfreaks.com/topic/274515-odd-issue-with-php-funtions/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.