user3007070
user3007070

Reputation: 1

php passing values on MAMP

This form worked when the code was running on my website. But now, I'm running this code on a MAMP server on my computer and the values do not get passed:

<form  name="theForm" action="do_addtask.php" method="post" enctype="multipart/form-data">
<input name="setid" type="hidden"   value="<? echo "$setid"; ?>">
<input name="week"  type="hidden"   value="<? echo "$ThisWeek"; ?>">
<input name="year"  type="hidden"   value="<? echo "$year"; ?>">
<input name="date"  type='hidden'   value="<? echo "$date"; ?>">
<INPUT name="submit" type="submit" value="Add">

Anyone?

Upvotes: 0

Views: 68

Answers (2)

na-98
na-98

Reputation: 889

The easy way to verify why your values aren't getting passed would be to do the following in do_addtask.php

var_dump($_POST)

Basically you are dumping everything out of post super global.

You can also use firebug in firefox or Chrome developer tool (press F12) to inspect if the values are actually getting set in this page where you have this form.

Upvotes: 0

John Conde
John Conde

Reputation: 219804

I bet you do not have short tags enabled on the new server. In your php.ini make sure short_open_tag is sent to on

short_open_tag=On

You can also checked your source code and you probably can see your PHP code in there.

Upvotes: 1

Related Questions