simplecontent Functions in PHP

Here's an overview about all sc-functions.

sc_die()

    string sc_die( int $errorcode );
    

The function uses die() and return an error. You have to include the sc-load.php.

validateMail()

    bool validateMail( string $mail );
    

The function validate with a great RegEx a E-Mail-Adress. You have to include the sc-load.php

connectMySQL()

    connectMySQL( string $sql , [bool $return_fetch_assoc , bool $return_no ] );
    

The function connectMySQL() connect you with the user's database. If you set return_fetch_assoc on, it returns a fetch assoc. If you set return_no on, it returns only the connection variable. If you only fill the first parameter, it returns a query by mysqli_query().

You have to include sc-load.php.

validateCommentForm()

        string validateCommentForm( int $postID );
    

The funciton validates your comment form. You have to give the first parameter, the Post-ID.

You have to include sc-load.php.

get_header()

get_header();

The function doesn't return, it print the header. You should be have the function in your header!

You have to include sc-load.php.

updateSetting()

updateSetting( string $settingName , string $newValue );

The function has two paramaters: The setting name and the new value. The function updates a setting.

You have to include sc-load.php.

get_category_by_id()

string get_category_by_id( int $id );

The function returns the category name.

You have to include sc-load.php.

getPostId()

int getPostId( string $permalink );

The function returns the post-meta-ID of the post with the permalink.

You have to include sc-load.php.

getSetting()

string getSetting( string $settingName );

The function returns the value of the setting.

You have to include sc-load.php.

validate_perml()

string validate_perml( string $string );

The function validates the permalink and returns a valid permalink.

You have to include sc-load.php.