0

i have this error and i dont know why. please help...thanks!

Webpage error details


Message: Unterminated string constant
Line: 19
Char: 45
Code: 0
URI: http://localhost/itams/user/checkIfReported.php?a=5

the codes in checkIfReported.php is this

<?php
session_start();

include "../configdb.php";
include "../opendb.php";

$_SESSION['a'] = $_GET['a'];               

$result = mysql_query("SELECT _status
    FROM assets
    WHERE _id='$_SESSION[a]'") or die('Could not Get Id: '.mysql_error());
    $row=mysql_fetch_array($result);
    $status=$row['_status'];
    
    switch($status)
    {
        case 'Under Maintenance' :
                                    echo "<script type='text/javascript'>location.href='userReport_Reported.php';</script>";
                                    break;
        case 'In Use':
                        echo "<script type='text/javascript'>location.href='userReport_Create_Ticket.php;</script>"; 
                        break;
        default: break;
    }

include "../opendb.php";
?>

the first case works, it redirects to the right page. but the second case gives that error.

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by vaultdweller123
0

you forgot the closing single quote

echo "<script type='text/javascript'>location.href='userReport_Create_Ticket.php;</script>";

to

echo "<script type='text/javascript'>location.href='userReport_Create_Ticket.php';</script>";
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.