Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP/Apache Error:406 Not Acceptable
    primarykey
    data
    text
    <p>So I received this error today, I've narrowed it down to this issue:</p> <p>My site is my musician page <a href="http://onkore.us" rel="nofollow">here</a>. It allows people to come in and see photos of me, news, my music and events I'm playing at.</p> <p>Everything was going swell, I manually input data into MySQL to have it auto-feed to the home page. Now I'm adding the control panel so I can add, edit, delete things in the database from the web.</p> <p>Everything works fine except for the ability to add/edit events. I've narrowed it down to the fact that I can't input 2 URLs or I get this error. I NEED to input 2 URLs (one to view the event page, one to buy tickets) but I can't input more than 1 at a time, is there anything I can do to correct or work around this error whether in apache or my code?</p> <pre><code>&lt;?php $specevlink = "http://facebooklink.com"; $specgigtick = "http://ticketplacelink.com"; ?&gt; &lt;form method="post" action="index.php?page=editgigs"&gt; &lt;table&gt; &lt;tr&gt; &lt;td&gt; Event Page (Link): &lt;/td&gt; &lt;td style="text-align: left;"&gt; &lt;input type="url" name="giglink" value="&lt;?php echo $specevlink; ?&gt;" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Event Tickets (Link): &lt;/td&gt; &lt;td style="text-align: left;"&gt; &lt;input type="url" name="gigtick" value="&lt;?php echo $specgigtick; ?&gt;" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&lt;br /&gt; &lt;input type="submit" name="editgig" value="submit" /&gt;&lt;br /&gt; &lt;br /&gt; &lt;/form&gt; </code></pre> <p>EDIT:</p> <p>I'm adding the full line of code so you can see exactly what I'm using,</p> <p>Here's a pic of <a href="http://onkore.us/editgigsstep1.jpg" rel="nofollow">step 1</a> Here's a pic of <a href="http://onkore.us/editgigsstep2.jpg" rel="nofollow">step 2</a></p> <p>This is included into an index.php file:</p> <pre><code>&lt;?php if(isset($_GET["page"])){ $page = $_GET["page"]; } else { $page = ""; } if($page === "editgigs"){ include ('inc/logincheck.php'); ?&gt; &lt;div class="label"&gt; EDIT GIGS &lt;/div&gt;&lt;br /&gt; &lt;div style="margin: 0 auto; text-align: center; width: 100%"&gt; &lt;form method="post" action="index.php?page=editgigs"&gt; &lt;?php if(!isset($_POST['selectgigs'])){ if(!isset($_POST['updgigs'])){ ?&gt; Select one of the options below:&lt;br /&gt; &lt;br /&gt; &lt;select name="selgigs" style="max-width: 26%;"&gt; &lt;?php while($gigsall_data = mysqli_fetch_array($gigsall_query)){ $gigid = stripslashes($gigsall_data['idgigs']); $gigdate = stripslashes($gigsall_data['date']); $gigname = stripslashes($gigsall_data['name']); $gigdate = date('F j, Y', strtotime($gigdate)); ?&gt; &lt;option value="&lt;?php echo $gigid; ?&gt;"&gt; &lt;?php echo $gigdate; ?&gt;: &lt;?php echo $gigname; ?&gt; &lt;/option&gt; &lt;?php } ?&gt; &lt;/select&gt;&lt;br /&gt;&lt;br /&gt; &lt;input type="submit" name="selectgigs" value="Select" /&gt;&lt;br /&gt; &lt;br /&gt; &lt;?php } } if(isset($_POST['selectgigs'])){ $gigtoed = trim($_POST['selgigs']); $specgig_query = mysqli_query($con, "SELECT * FROM `gigs` WHERE `idgigs` = '$gigtoed'") or die(mysqli_error($con)); $specgig_data = mysqli_fetch_array($specgig_query); $specdate = stripslashes($specgig_data['date']); $specname = stripslashes($specgig_data['name']); $specevlink = stripslashes($specgig_data['evlink']); $specgigtick = stripslashes($specgig_data['ticklink']); $specnos = stripslashes($specgig_data['noshow']); if($specnos === '0'){ $noshow = ''; } else { $noshow = 'checked'; } ?&gt; &lt;table style="border-spacing: 5px; padding: 10px;"&gt; &lt;tr&gt; &lt;td&gt; Past Event?: &lt;/td&gt; &lt;td style="text-align: left;"&gt; &lt;input type="checkbox" name="nos" &lt;?php echo $noshow; ?&gt; /&gt; Past Event &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Date: &lt;/td&gt; &lt;td style="text-align: left;"&gt; &lt;input type="date" name="gigdate" value="&lt;?php echo $specdate; ?&gt;" required /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Name: &lt;/td&gt; &lt;td style="text-align: left;"&gt; &lt;input type="text" name="gigname" value="&lt;?php echo $specname; ?&gt;" required /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Event Page (Link): &lt;/td&gt; &lt;td style="text-align: left; width: 350px;"&gt; &lt;input type="url" name="giglink" style="width: 100%;" value="&lt;?php echo $specevlink; ?&gt;" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Event Tickets (Link): &lt;/td&gt; &lt;td style="text-align: left; width: 350px;"&gt; &lt;input type="url" name="gigtick" style="width: 100%;" value="&lt;?php echo $specgigtick; ?&gt;" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&lt;br /&gt; &lt;input type="hidden" name="gigid" value="&lt;?php echo $gigtoed; ?&gt;" /&gt; &lt;input type="submit" name="updgigs" value="Update" /&gt;&lt;br /&gt; &lt;br /&gt; &lt;?php } if(isset($_POST['updgigs'])){ $newid = trim($_POST['gigid']); $newdate = mysqli_real_escape_string($con, trim($_POST['gigdate'])); $newname = mysqli_real_escape_string($con, trim($_POST['gigname'])); $newlink = mysqli_real_escape_string($con, trim($_POST['giglink'])); $newtick = mysqli_real_escape_string($con, trim($_POST['gigtick'])); if(isset($_POST['nos'])){ $newnoshow = mysqli_real_escape_string($con, '1'); } else { $newnoshow = mysqli_real_escape_string($con, '0'); } echo $newid.' '.$newdate.' '.$newname.' '.$newlink.' '.$newtick.' '.$newnoshow.'&lt;br /&gt;'; /*mysqli_query($con, "UPDATE `gigs` SET `date` = '$newdate', `name` = '$newname', `evlink` = '$newlink', `ticklink` = '$newtick', `noshow` = '$newnoshow' WHERE `idgigs` = '$newid' LIMIT 1") or die(mysqli_error($con));*/ //commented for testing ?&gt; &lt;div style="text-align: center;"&gt; &lt;span class="confirm"&gt; Successfully updated click &lt;a href="index.php?page=events"&gt;here&lt;/a&gt; to view it! &lt;/span&gt; &lt;/div&gt; &lt;?php } ?&gt; &lt;/form&gt; &lt;/div&gt; &lt;?php } </code></pre> <p>FYI- the logincheck.php is does nothing but check if the user is logged in, if not it sends them back to the home page.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload