Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

As per your originally/revised posted question/code:originally/revised posted question/code:

Since you are relying on name="solist" as per your submit button to call the function, you need to do something to the effect of:

if(isset($_POST['solist'])){ // call the solist function echo solist(); } 

The function won't fire up on its own, it needs to be called.


"or try to use function solist(PDO $DBH)"

You don't need to do that. Just call the function; there is no need to pass a parameter, since you've already set it as global.

If you're not going to declare it as global, then just do function solist($DBH)

As per your originally/revised posted question/code:

Since you are relying on name="solist" as per your submit button to call the function, you need to do something to the effect of:

if(isset($_POST['solist'])){ // call the solist function echo solist(); } 

The function won't fire up on its own, it needs to be called.


"or try to use function solist(PDO $DBH)"

You don't need to do that. Just call the function; there is no need to pass a parameter, since you've already set it as global.

If you're not going to declare it as global, then just do function solist($DBH)

As per your originally/revised posted question/code:

Since you are relying on name="solist" as per your submit button to call the function, you need to do something to the effect of:

if(isset($_POST['solist'])){ // call the solist function echo solist(); } 

The function won't fire up on its own, it needs to be called.


"or try to use function solist(PDO $DBH)"

You don't need to do that. Just call the function; there is no need to pass a parameter, since you've already set it as global.

If you're not going to declare it as global, then just do function solist($DBH)

added a link to OP's originally posted code, and not marking the last update as an additional edit
Source Link
Funk Forty Niner
  • 74.2k
  • 14
  • 71
  • 146

As per your originally/revised posted question/code:

Since you are relying on name="solist" as per your submit button to call the function, you need to do something to the effect of:

if(isset($_POST['solist'])){ // call the solist function echo solist(); } 

The function won't fire up on its own, it needs to be called.


"or try to use function solist(PDO $DBH)"

You don't need to do that. Just call the function; there is no need to pass a parameter, since you've already set it as global.

If you're not going to declare it as global, then just do function solist($DBH)

Since you are relying on name="solist" as per your submit button to call the function, you need to do something to the effect of:

if(isset($_POST['solist'])){ // call the solist function echo solist(); } 

The function won't fire up on its own, it needs to be called.


"or try to use function solist(PDO $DBH)"

You don't need to do that. Just call the function; there is no need to pass a parameter, since you've already set it as global.

If you're not going to declare it as global, then just do function solist($DBH)

As per your originally/revised posted question/code:

Since you are relying on name="solist" as per your submit button to call the function, you need to do something to the effect of:

if(isset($_POST['solist'])){ // call the solist function echo solist(); } 

The function won't fire up on its own, it needs to be called.


"or try to use function solist(PDO $DBH)"

You don't need to do that. Just call the function; there is no need to pass a parameter, since you've already set it as global.

If you're not going to declare it as global, then just do function solist($DBH)

deleted 12 characters in body
Source Link
Funk Forty Niner
  • 74.2k
  • 14
  • 71
  • 146

Since you are relying on name="solist" as per your submit button to call the function, you need to do something to the effect of:

if(isset($_POST['solist'])){ // call the solist function echo solist(); } 

The function won't fire up on its own, it needs to be called or returned.


"or try to use function solist(PDO $DBH)"

You don't need to do that. Just call the function; there is no need to pass a parameter, since you've already set it as global.

If you're not going to declare it as global, then just do function solist($DBH)

Since you are relying on name="solist" as per your submit button to call the function, you need to do something to the effect of:

if(isset($_POST['solist'])){ // call the solist function echo solist(); } 

The function won't fire up on its own, it needs to be called or returned.


"or try to use function solist(PDO $DBH)"

You don't need to do that. Just call the function; there is no need to pass a parameter, since you've already set it as global.

If you're not going to declare it as global, then just do function solist($DBH)

Since you are relying on name="solist" as per your submit button to call the function, you need to do something to the effect of:

if(isset($_POST['solist'])){ // call the solist function echo solist(); } 

The function won't fire up on its own, it needs to be called.


"or try to use function solist(PDO $DBH)"

You don't need to do that. Just call the function; there is no need to pass a parameter, since you've already set it as global.

If you're not going to declare it as global, then just do function solist($DBH)

Source Link
Funk Forty Niner
  • 74.2k
  • 14
  • 71
  • 146
Loading