Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


PHP/MySQL/Html5 Coding Help (Forms)
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

PHP/MySQL/Html5 Coding Help (Forms)

ZealZeal Member

Hello LEB,

I need help developing my website.
1) When I try to insert data from a drop down predefined from a MySQL DB, the insert does not work if there is a apostrophe, other wise the form works perfectly fine.
2) I want choices in a form to be restricted. Say each choice has a different budget, I want:
a) Total selected options not to exceed points/balance
b) Must select at least 1 options from a certain category
c) Can not select more than 3 options from one category
d) Max amount and minimum amount of options selected in is 8
e) There is a budget of 10 Points, each option is worth a different amount of points predetermined.
f) Get the average and most recent score for each option

Options are predefined in the database.

If I could please get help with form creation and display based on html/php/mysql, this would be great.

I am willing to pay and/or donate for compensation if needed.

Comments

  • agoldenbergagoldenberg Member, Host Rep

    Mysql_real_escape_string(string with apostrophe)

  • @agoldenberg said:
    Mysql_real_escape_string(string with apostrophe)

    He should be using pdo at this day and age

  • @agoldenberg said:
    Mysql_real_escape_string(string with apostrophe)

    PDO or GTFO

  • @Jonchun said:
    He should be using pdo at this day and age

    PDO or mysqli. Both are decent.

  • I still support PDO as learning how to use it will allow you to use a ton of different database structures as needed. You do bring up a fair point though :)

  • vladka24vladka24 Member
    edited February 2015

    Just Google pdo, its way too easy to migrate, and you dont need worry about escaping strings which = good for lazy ppl.

  • I use MySQLi

  • @vladka24 said:
    Just Google pdo, its way too easy to migrate, and you dont need worry about escaping strings which = good for lazy ppl.

    Still have to bind and prepare statements = worse for lazy people

  • DillybobDillybob Member
    edited February 2015

    vladka24 said: you dont need worry about escaping strings which = good for lazy ppl.

    But awful coding practices. If someone is worried and doesn't know or 'want' to properly cast variables..is quite frankly.. shouldn't be coding in the first place. :P

  • @Jonchun said:
    Still have to bind and prepare statements = worse for lazy people

    Nahhh....

  • Using mysql extension is not a bad practice. Concatenating SQL strings is.

    For those who are lazy, I've been using ADOdb for a while and that's placeholder style query call. No bind and prepare, just call like ('... where id = ? ', id).

    Thanked by 2vladka24 Jonchun
  • agoldenbergagoldenberg Member, Host Rep
    edited February 2015

    Sorry I was writing it as lazy as possible.

  • ZealZeal Member
    edited February 2015

    Thanks all, Mysql_real_escape_string(string with apostrophe) worked just fine. :D

    For the form creation part, where can I hire someone with a low budget?

  • @Zeal said:
    For the form creation part, where can I hire someone with a low budget?

    Depends on what a "low budget" means for you.

  • Cant get lower than free. Ive got time at the weekends and a few hours each night (GMT). Currently on an internship working on Openstack Swift but would like to fill my CV with some frontend / full stack work. Cant guarantee anything but send a PM if interested or you want a CV / more info on what I'm currently doing.

Sign In or Register to comment.