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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.