Rename Object

You can’t rename objects in S3, you have to copy them to a new object name and then delete the original //—– SET THE FILE NAME EXTENSION TO MATCH THE USER UPLOADED FILE —– require_once ‘my_sdk_files_path/sdk.class.php’; //<<<<SET THIS $s3 = new AmazonS3(); $bucket = “my_bucket_name”; //<<<<SET THIS //GET THE USERS FILENAME EXTENSION $filename_extension = pathinfo($uploaded_source_file_name, […]

Read More

MySQL Errors

Object Oriented Style Turn on error reporting Displaying error with ->prepare() sql statement There is an issue with this in that you need to first use $stmt=False; if using $stmt again, otherwise $maindb->error will be empty. Explanation here: https://stackoverflow.com/questions/40719953/mysqli-prepare-returns-false-but-mysqli-error-is-an-empty-string Procedural Style Displaying A MySQL Error die(mysql_error()) is very handy when debugging why a MySQL function isn’t […]

Read More

Error Handling

@function_name Prefixing a function with an @ will hide any error message generated by thefunction. If a function will possibly fail, you can prefix it with the @,then check the return value to see if the function did infact work or not.

Read More

.CSS General

DIV vs SPAN DIV’s cause a new line.  To change the stule of text min line use SPAN Using Div’s Without A Style <div style=”margin-top: 10px;”> ‘.’ or ‘# # is for ID You use ‘#somename’ when its an <div id=”somename” ID’s can be useful to suround an area so that you can use this […]

Read More

Submit Button

Styling See here Using An Image For The Button Multiple Submit Buttons Using the button name parameter Using the buttons “value” Different Value and Button Text Cancel button You have to create on, there’s no standard cancel button In the form: When handling the form:

Read More