Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6177787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:20:14+00:00 2026-05-24T00:20:14+00:00

<img src=img/commentBelowIcon.png width=26 height=26 class=left /><h3>Add Comment</h3> <?php if(!empty($_GET[‘pID’])) $the_pID = mysql_real_escape_string($_GET[‘pID’]); $thedt =

  • 0
<img src="img/commentBelowIcon.png" width="26" height="26" class="left" /><h3>Add Comment</h3>
                <?php if(!empty($_GET['pID'])) $the_pID = mysql_real_escape_string($_GET['pID']); $thedt = date("Y-m-d");?>                              
                <form action="inc/q/prof.php?pID=<?php echo $the_pID; ?>" method="post" id="addition">            
                     <div class="field required"> 
                    <select id="courseInfoDD"  class="verifyText" name="courseInfoDD" tabindex="1">
                    <option  disabled="disabled">Course...</option>
                            <?php while($row3 = $sth3->fetch(PDO::FETCH_ASSOC))
                                    {echo "<option value=". $row3['cID'] . ">" .$row3['prefix']." ".$row3['code']."</option>";}
                            ?>
                    </select>    
                    </div>
                     <div class="field required">    
                    <select id="commQuarter" class="verifyText" name="commQuarter" tabindex="2" >
                            <option  disabled="disabled">Quarter...</option>
                             <option value="Fall">Fall</option>
                             <option value="Winter">Winter</option>
                             <option value="Spring">Spring</option>
                             <option value="Summer">Summer</option>
                    </select> 
                    </div>
             <div class="field required"> 
             <select id="commYr" name="commYr" class="verifyText" tabindex="3">
                            <option  disabled="disabled">Year...</option>
                            <?php $startdate = 2000;$enddate = date("Y");$years = range ($startdate,$enddate);foreach($years as $year){echo "<option value='$year'>$year</option>";}?>
              </select>  
             </div>

            <div class="field required">    
                    <select id="commExp" class="verifyText" name="commExp" tabindex="4" >
                        <option disabled="disabled">Overall Experience</option>
                        <option value="1">Positive</option>
                        <option value="2">Neutral</option>
                        <option value="3">Negative</option>
                    </select> 
             </div> 


            <div class="field required">
                    <textarea type="text" id="addComment" class="verifyText" name="addComment" tabindex="5" value="Enter comment"></textarea></div>
                <input type="hidden" name="dt" value="<?php echo $thedt; ?>" />
                <input type="hidden" name="pID" value="<?php echo $the_pID; ?>" />
                <div class="field required">
                Accept Terms?
                Yes:&nbsp;<input type="radio" name="terms" value="Yes" id="accepting" tabindex="6" />
                No:&nbsp;<input type="radio" name="terms" value="No"  id="accepting" tabindex="7" />
                </div>
                <p class="iferror">Please correct the above.</p>

                <input type="submit" name="submit" id="submit" tabindex="8" />
                </form> 

                    </div>
            </div>

<?php // Get select box options 
$pID3 = filter_input(INPUT_GET, 'pID', FILTER_SANITIZE_NUMBER_INT);
        $pdo3 = new PDO('mysql:host=###;dbname=###', $u, $p);
        $pdo3->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
$sth3 = $pdo3->prepare('
    SELECT pID, C.cID, C.prefix, C.code
    FROM Department D, Course C, Professor P
    WHERE pID = ?
    AND D.dID = C.dID
    AND D.dID = P.dID; 
');
        $sth3->execute(array(
            $pID3
        ));
?>

I get submitted data that looks like this:
img

How do I get a value for cID to submit as well? Can someone show me what I need to put in my php?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T00:20:15+00:00Added an answer on May 24, 2026 at 12:20 am

    execute

    $cid = mysql_insert_id();
    

    after

    $sth3->execute(array(
                $pID3
            ));
    

    link http://php.net/manual/en/function.mysql-insert-id.php

    hope helps

    🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The img src that I need to grab is: div id=recaptcha_image class=width: 300px; height:
I have a tracking pixel img like this one: <img ... width=1 height=1 src=http://trk.dom123.com/file.aspx?type=1&cp=1
<img src =~/UserControls/Vote/Images/Arrow Up.png id = vote-up-off runat = server alt =vote up class=voteupImage
var tmp = ; function putItem() { this.innerHTML = <img src = 'image/+tmp+.png'>; }
Html <input type=file name=picture value= /> <img id=preview_pic src=/images/no-image.jpg alt= height=100 width=100 /> I
my jquery code: img[i]='img-src'; $(#popimage1).attr(src,img[i]); alert($(#popimage1).width()); //doesn't give the width of the current image,
I have solved this with PHP by adding the 'time()' to the img src
Server 1 Pings/Request URL http://website.com/page.php?code=NeedThat Server 2 page.php grabs NeedThat and execute img src
Possible Duplicate: How to extract img src, title and alt from html using php?
I have following code (php), it will match img-src and replace with new url

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.