Jump to content
SingaporeBikes.com Telegram Now LIVE! Join NOW for the Last Reviews, News, Promotions & Offers in Singapore! ×
  • Join SingaporeBikes.com today! Where Singapore Bikers Unite!

    Thank you for visiting SingaporeBikes.com - the largest website in Singapore dedicated to all things related to motorcycles and biking in general.

    Join us today as a member to enjoy all the features of the website for FREE such as:

    Registering is free and takes less than 30 seconds! Join us today to share information, discuss about your modifications, and ask questions about your bike in general.

    Thank you for being a part of SingaporeBikes.com!

PHP help needed


Recommended Posts

Guest nicholasoh
Posted

Brudder,

 

I have 2 problems here that need you to help me solve.

 

1) Under qn1.zip, lying 3 files, test.php, testaction.php, test2.php. In test.php, when I keyed in hex(#) value in the name field and click submit, it returns an error ("Notice: Undefined index: class"). I found out that this is only true when I'm retrieving in hex (#) value from $_GET function. Is there anyway that I can solve this? I need the action page to insert a if..else criteria in it.

 

2) Under qn2.zip, lying 2 files, addColor.php, addColor2.php. In addColor.php, user have to key in the number of colors that he wish to insert. addColor2.php will take the number into a for() loop and generate the repetitive number of color(s) of fields for user to enter. My problem is, how do I validate this? Since I'm using an incremental value after the field variable (ColorName. $i), if I were to use javascript, which I strongly encourage, I need to key in a static variable name. But in this case, I can't. Unless I can write a JS function, to validate any field variable with name starting with "ColorName". So be it the variable is ColorName1 or ColorName100, it will still be validated. Don't know if it's possible.

 

Please help me k?

 

qn1

qn2

 

Thanks

  • Replies 0
  • Created
  • Last Reply

Popular Days

Popular Days

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • DAIS_ShellBAU2024_Motorcycle_SingaporeBikesBanner_300x250.jpg

     
×
×
  • Create New...