0

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?

0

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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.

1 Comment

grabbed the values from var_dump($_POST), values officially not getting passed by form (except for setid, pre-populated):array(8) { ["setid"]=> string(2) "WD" ["week"]=> string(0) "" ["year"]=> string(0) "" ["date"]=> string(0) "" ["title"]=> string(0) "" ["status"]=> string(1) "1" ["descr"]=> string(0) "" ["submit"]=> string(3) "Add" }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.