garyblackpool Posted September 14, 2009 Share Posted September 14, 2009 The sever which i am using runs on php5 so i think the problam is with the syntax. I keep on getting Fatal error: Function name must be a string. Could you please help cos been searching but have not been able to find anyting thanks. <form method="post" action="display_input.php"><p><strong> Text Field</strong><br><textarea name="text" cols=45 rows=5 wrap=virtual></textarea></p><p><strong>String Functions</strong></br><input type="radio" name="func" value="md5" checked> get md5<br><input type="radio" name="func" value="strlen" checked> length of string<br><input type="radio" name="func" value="strrev" checked>reverse string<br><input type="radio" name="func" value="strtoupper" string uppercase<br><input type="radio" name="func" value="strtolower" checked>string lowercase3<br><input type="radio" name="func" value="ucwords" checked>first letter capital<br></p><p><input type="submit" name="submit" value="do Something with the String"><p></form> And this is the other file <?$result = $func($text1); ?><html><head<title> Generic Input Results</title></head><body><? echo "$result"; ?><p><a href="generic_form.html">Go again!</a><p></body><html> Thanks for any help Link to comment Share on other sites More sharing options...
justsomeguy Posted September 14, 2009 Share Posted September 14, 2009 You're not getting the values from $_POST, you need to get the form data from the $_POST array. It's not going to automatically create the variables for you. That's an old option that is no longer in use.Also, don't put that script on a live server, it's a security risk. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.