/    Sign up×
Community /Pin to ProfileBookmark

forms causing errors in php script

whenever i try and put a form like

<select name=”blah”>
<option value=”blah”>Blah</option
</select>

whenever i put that in php tags in causes a parse error why and how do i fix it.

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@ConorauthorJan 25.2004 — so someone told me i have to in front of quotes so i have this but im still getting errors

[code=php]<?

include ("common.php");

$output = "<FORM ACTION='/boards/postbox.php' METHOD=POST>

<select name="choice">

<option value="45, 15">Standard</option>

<option value="35, 10">Small</option>

<option value="55, 20">Medium</option>

<option value="65, 30">Large</option>

</select>

<input type="submit" value="submit">

</form>";



$sql = "UPDATE ".TABLE_USERS." SET post_box = '".$_POST['choice']."' WHERE ID = '".$userdata['ID']."' LIMIT 1";

$exe = mysql_query($sql);


$pagecontents = $output;

include("layout.php");

?>[/code]
Copy linkTweet thisAlerts:
@crh3675Jan 25.2004 — What are the errors and what line?

--Craig
Copy linkTweet thisAlerts:
@ConorauthorJan 25.2004 — i figured i t out i was being stupid.
×

Success!

Help @Conor spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...