Skip to main content

mysql row turning into attributes



I need help with an <input> . Some times when I call for the var to be inserted into the value="" part of the <input> it makes every word into an attribute. For example my tag will look like this <input type="hidden" name="article" this="" is="" the="" article="" text="" />





and the call to the <input> is this echo '<input type="hidden" name="article" value="'.$row['article'].'" />';





below is the actual code





CODE:







echo '<input type="hidden" name="date_added" value="'.$row['date_added'].'" />';

echo '<input type="hidden" name="id" value="'.$row['id'].'" />';

echo '<input type="hidden" name="article" value="'.$row['article'].'" />';

echo '<input type="hidden" name="pub_date" value="'.$row['pub_date'].'" />';







OUTPUT:







<input type="hidden" "="" added.="" snow,"="" shoveling="" those="" times,="" four="" years="" two="" real="" worn="" only="" "i've="" balance."="" i'm="" feels,="" actual="" where="" point="" gotten="" i've="" shoes.="" thing,"="" different="" whole="" ground,="" can="" "when="" world."="" senses="" off="" closing="" disconnected.="" time.="" all="" gloves="" wearing="" likens="" feeling."="" addicting="" an="" almost="" it's="" you,="" around="" world="" feeling="" used="" "you="" them,"="" comfortable="" you're="" wear="" choosing="" more="" "it's="" feet.="" your="" feel="" lifestyle"="" "barefoot="" calls="" being="" enjoys="" things="" explained="" experience."="" textures="" many="" "there's="" greatest,"="" "chautauqua="" chautauqua,="" trailhead="" favorite="" group's="" boulder="" aurora="" members="" year-round="" hikes="" day?"="" my="" rest="" what="" well,="" at,="" look="" have="" you="" that,="" explore="" start="" "but="" society,"="" prolific="" because="" thing,="" now="" attention="" people's="" grabbing="" what's="" members,="" 100="" surpassed="" recently="" grown="" has="" their="" it?="" why="" thought,="" hiking,="" enjoyed="" since="" home,="" clients="" works="" she's="" day="" spending="" already="" brushaber="" group.="" join="" first="" who="" practitioner="" movement="" brushaber,="" kriste="" organizing="" partner="" hartman's="" hiking.="" eventually,="" walking="" kept="" marathon,="" run="" change.="" change."="" would="" pain.="" back="" time,="" at="" marathon="" training="" problems.="" other="" few="" splints="" shin="" hartman="" ago,"="" while="" running.="" trying="" after="" started="" group="" meetup="" range="" front="" hartman,="" mary="" thing."="" natural,="" this="" into="" getting="" are="" "people="" he="" (shoes),"="" our="" trail="" appalachian="" guys="" "we="" sashen="" somewhere,"="" some="" top="" them="" me="" showing="" people="" from="" pictures="" testimonials="" get="" walking.="" nearly-barefoot="" for="" footwear="" sandals="" vibram-soled="" light="" makes="" which="" shoes,="" invisible="" founder="" sashen,="" steven="" says="" deal,="" big="" becoming="" minimalist="" boom.="" running="" heels="" on="" popularity="" in="" growing="" shoes="" without="" hiking="" say="" barefooters="" local="" most,="" loftier="" bit="" ascent="" barefoot="" baker's="" said.="" could="" knew="" so="" kilimanjaro,="" than="" harder="" lot="" hell="" "longs="" crazy.="" baker="" but="" crazy."="" quite="" is="" climbing="" everyone="" about="" just="" "i="" said,="" barefoot,="" kili="" climb="" try="" crazy="" it="" thought="" would've="" guides="" whether="" asked="" before.="" that="" like="" request="" a="" made="" ever="" had="" one="" no="" though="" even="" sure,="" paschall="" barefoot.="" attempt="" she'd="" sure="" make="" reach,="" within="" adventures="" boulder's="" owner="" paschall,="" robin="" agent,="" travel="" her="" with="" checked="" year,="" last="" peak="" highest="" africa's="" --="" mountain="" 19,336-foot="" trip="" the="" booked="" she="" when="" boulder.="" of="" baker,="" said="" it,"="" welcoming="" really="" not="" were="" and="" it,="" do="" able="" be="" to="" going="" was="" i="" think="" didn't="" they="" value="When Sonnet Baker showed up at the bottom of Mount Kilimanjaro ready to hike up the mountain barefoot, her guides had doubts. " name="article">







All the others <input> fields work fine. Please tell me what I'm doing wrong.


Comments

  1. Always use htmlspecialchars($string, ENT_QUOTES) when putting data in HTML-attributes:

    echo '<input type="hidden" name="article" value="'.htmlspecialchars($row['article'], ENT_QUOTES).'" />';


    Also, google for XSS-attacks.

    ReplyDelete

Post a Comment

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?

CCNA 3 Final Exam => latest version

1 . Which security protocol or measure would provide the greatest protection for a wireless LAN? WPA2 cloaking SSIDs shared WEP key MAC address filtering   2 . Refer to the exhibit. All trunk links are operational and all VLANs are allowed on all trunk links. An ARP request is sent by computer 5. Which device or devices will receive this message? only computer 4 computer 3 and RTR-A computer 4 and RTR-A computer 1, computer 2, computer 4, and RTR-A computer 1, computer 2, computer 3, computer 4, and RTR-A all of the computers and the router   3 . Refer to the exhibit. Hosts A and B, connected to hub HB1, attempt to transmit a frame at the same time but a collision occurs. Which hosts will receive the collision jamming signal? only hosts A and B only hosts A, B, and C only hosts A, B, C, and D only hosts A, B, C, and E   4 . Refer to the exhibit. Router RA receives a packet with a source address of 192.168.1.65 and a destination address of 192.168.1.161...