question about what should display on a php page

:o HELP!!!
My manager gave me a task…to complete a PHP page by Monday…and all I was given was a wrapper…Ill paste the code, and here is the link as well to the page that I made with the wrapper. The page is blank…I dont know what is supposed to display…I do not know what he wants really. This was all I was given…a wrapper…HELP…this is my FIRST PHP project!

Please be gentle

the url:

the code:

NOTE: value based on “team Routing Structure”

<?php # Set the value of $debug to 0 to disable debug output $debug = 0; if ($debug == 1) { echo "user_login=" . $_POST['user_login'] . "
\n"; echo "user_name=" . $_POST['user_name'] . "
\n"; echo "Product_Name=" . $_POST['Product_Name'] . "
\n"; echo "Assigned_Group=" . $_POST['Assigned_Group'] . "
\n"; echo "Summary=" . $_POST['Summary'] . "
\n"; echo "Notes=" . $_POST['Notes'] . "
\n"; } $credentials=base64_encode("[TeanUserName:Password]"); $variables = array( 'Login_ID' => $_POST['user_login'], 'user_name' => $_POST['user_name'], 'user_login' => $_POST['user_login'], 'Impact' => '4000', 'Urgency' => '4000', 'Operational_Categorization_Tier_1' => 'Modify', 'Operational_Categorization_Tier_2' => 'Access', 'Product_Categorization_Tier_1' => 'Enterprise, Commercial %26 Small Business', 'Product_Categorization_Tier_2' => 'Voice Technology Group', 'Product_Categorization_Tier_3' => 'Unified Communications Systems', 'Product_Name' => $_POST['Product_Name'], 'Manufacturer' => 'Cisco', 'Support_Company' => 'Cisco Systems', 'Support_Organization' => 'Voice Technology Group', 'Assigned_Group' => $_POST['Assigned_Group'], 'Summary' => $_POST['Summary'], 'Notes' => $_POST['Notes'], 'Display' => '1', 'Action' => 'CREATE' ); $post_vars = ""; foreach (array_keys($variables) as $key) $post_vars .= $key . "=" . $variables[$key] . "&"; $post_vars = preg_replace("/&$/", "", $post_vars); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,""); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_PROXY, ""); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_vars); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Authorization: Basic ' . $credentials, )); $content = curl_exec( $ch ); curl_close ($ch); echo " " . $content; ?>


There could be many reasons why script not work. For example, curl extension is not available, etc. But to locate the problem you need to enable output of php errors/warnings. Try to set error_reporting(E_ALL), and also make sure you have display_errors = on in your php.ini OR have errors recorded to a log file. To do this, set in php.ini error_log error.txt
If you have no access to php.ini, you can add these lines to .htaccess

php_value error_log error.txt
php_value display_errors on

Once you complete with debugging and fixed error, turn Off displaying errors/warning/notices.

Sponsor our Newsletter | Privacy Policy | Terms of Service