Tag Archives: tutorial

Inserting Backslashes into a Database Table with PHP

Sometimes you need to store things like file paths into a database table during your PHP script’s execution. However, on going back to the database after running your script, you might come across your path with all of its backslashes (\) missing! Continue reading

Posted in Technology & Code, Tutorials | Tagged , , , , , , | View Comments

Getting the First Object Returned by a jQuery Selector

If for instance you have just used a jQuery selector to grab a whole lot of objects and now realize that in actual fact you only want to effect the first object that the selector returned to you, you can rest easy in the knowledge that jQuery as per usual has you covered. Continue reading

Posted in Technology & Code, Tutorials | Tagged :first, eq(0), first element, , , | View Comments

jQuery: Get all Selected Values or Text from a Multiple Select Listbox

Grabbing all the selected values or even text values from a multiple select listbox turns out to be quite simple if you know which tools to use. Continue reading

Posted in Technology & Code, Tutorials | Tagged , , , , , , | View Comments

SQL: Return all the Names when you have all the IDs

I have all the ID values for wildlife parks but instead of displaying the ID values I want to display the park names. These are stored in a table that has two fields, namely ID and the corresponding display name. Continue reading

Posted in Technology & Code, Tutorials | Tagged in, sets, single select, , sql statement, | View Comments

Remove all Listbox and Dropdown List Items with jQuery

Today’s little code snippet is going to look at removing all the options from a select dropdown list or listbox, on the fly and using jQuery. Continue reading

Posted in Technology & Code, Tutorials | Tagged , , , , , | View Comments
« Navigation »