Tag Archives: html

PHP htmlentities() not working as expected

Questions: I’m having a problem with htmlentities() $txt = “árbol”; echo $txt; // outputs: árbol echo htmlentities($txt); // outputs: árbol (&Atilde;&iexcl;rbol) The second echo should output árbol (&aacute;) I’m using utf-8: <meta charset=”utf-8″> What’s going on? Thank you! Answers:

Can't make PHP function work inside HTML inside PHP

Questions: I wrote this code, it gets an image from a link that varies according to where you are: <img src=’http://chusmix.com/Imagenes/grupos/<?php echo substr(get_search_query(), 1); ?>.jpg’> I want to make that code run if a PHP condition proves true, but I cannot make it work. It seems that the function doesn’t return a value instead it… Read More »

HTML and PHP simple contact form

Questions: I tried to make a simple contact form via HTML and PHP but the form doesn’t seem to submit. it stays on the HTML page and doesn’t post to the php form. simple_form.html code <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml”> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /> <title>Simple Feedback Form</title> </head>… Read More »

Encrypt html code in source view

Questions: I am using an video embed code (Similar to youtube’s embed code) and I would like to Encrypt or hash a part of the code (The Video id or filename of the video). It is important to me that a user that views the source code of the page wont be able to view… Read More »

Selecting default value in html dropdown list

Questions: I am currently looking to have a drop down list in my form. I have this drop down which selects the default value: <p>Price Band:<select id=’priceBand’ style = ‘width:150px’ value = ‘band1’> <option value=”band7″>Reduce by 30c</option> <option value=”band6″>Reduce by 25c</option> <option value=”band5″>Reduce by 20c</option> <option value=”band4″>Reduce by 15c</option> <option value=”band3″>Reduce by 10c</option> <option value=”band2″>Reduce… Read More »