The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HELP!!!!
#1
Hi all, I have the following code as one of my pages and I keep being told I have some kind of DB error. How do I find out what it is?

<?php

require_once 'users/init.php';
require_once $abs_us_root.$us_url_root.'users/includes/header.php';
require_once $abs_us_root.$us_url_root.'users/includes/navigation.php';

if (!empty($_POST['studio-name']))
{
$studio_name = Input::get('studio-name');
$studio_url = Input::get('studio-url');
$studio_rss = Input::get('studio-rss');
$studio_bio = Input::get('studio-bio');
$added_on = Input::get('added-on');
$added_by = Input::get('added-by');

$insert = array('studio_name'=>$studio_name, 'studio_url'=>$studio_url,'studio_rss'=>$studio_rss,'studio_bio'=>$studio_bio, 'studio_added'=>$added_on, 'studio_by'=>$added_by);
$db->insert('ad-studio',$insert);
if ($db->error()) { echo "Some kind of DB error!"; die();}
?>
<div id="page-wrapper">
<div class="container">
<div class="jumbotron">
<h1>Thank you!</h1> The Studio Information you have provided has been added!
</div>
</div>
</div>
<!-- footers -->
<?php require_once $abs_us_root.$us_url_root.'users/includes/page_footer.php'; // the final html footer copyright row + the external js calls ?>

<!-- Place any per-page javascript here -->


<?php require_once $abs_us_root.$us_url_root.'users/includes/html_footer.php'; // currently just the closing /body and /html ?>
<?php
die();
}
?>

<div id="page-wrapper">
<div class="container">
<form action="addstudio.php" method="post" class="form-group">
<label for="studio-name">Studio Name</label>
<input type="text" name="studio-name" class="form-control" id="studio-name" placeholder="Podcast Audio" required><p/>
<label for="studio-url">Studio URL</label>
<input type="url" name="studio-url" class="form-control" id="studio-url" placeholder="http://podcastaudio.com" required><p/>
<label for="studio-rss">Studio RSS</label>
<input type="url" name="studio-rss" class="form-control" id="studio-rss" placeholder="http://podcastaudio.com/?feed=rss" required><p/>
<label for="studio-bio">Studio Bio</label>
<textarea id="studio-bio" name="studio-bio" cols="80" rows="20"></textarea><p/>
<input type="hidden" name="added-on" value="<?php echo date('m/j/Y'); ?>">
<input type="hidden" name="added-by" value="<?php echo $user->data()->id; ?>">
<button type="submit" name="add-studio" <?php if(!$user->isLoggedIn()){ echo "disabled"; } ?> class="form-control btn btn-primary">Add Studio</button>
</form>
</div>
</div>


<!-- footers -->
<?php require_once $abs_us_root.$us_url_root.'users/includes/page_footer.php'; // the final html footer copyright row + the external js calls ?>

<!-- Place any per-page javascript here -->


<?php require_once $abs_us_root.$us_url_root.'users/includes/html_footer.php'; // currently just the closing /body and /html ?>
  Reply


Messages In This Thread
HELP!!!! - by Katronix - 08-21-2017, 12:15 PM
HELP!!!! - by mudmin - 08-21-2017, 12:20 PM
HELP!!!! - by Katronix - 08-21-2017, 12:26 PM
HELP!!!! - by Brandin - 08-21-2017, 12:38 PM
HELP!!!! - by mudmin - 08-21-2017, 12:38 PM
HELP!!!! - by mudmin - 08-21-2017, 12:43 PM
HELP!!!! - by Katronix - 08-21-2017, 12:51 PM
HELP!!!! - by mudmin - 08-21-2017, 12:54 PM
HELP!!!! - by Katronix - 08-21-2017, 01:01 PM
HELP!!!! - by mudmin - 08-21-2017, 01:03 PM
HELP!!!! - by mudmin - 08-21-2017, 01:03 PM
HELP!!!! - by Katronix - 08-21-2017, 01:12 PM
HELP!!!! - by mudmin - 08-21-2017, 01:22 PM
HELP!!!! - by Katronix - 08-21-2017, 01:24 PM
HELP!!!! - by mudmin - 08-21-2017, 01:25 PM
HELP!!!! - by Katronix - 08-21-2017, 01:39 PM
HELP!!!! - by mudmin - 08-21-2017, 01:40 PM
HELP!!!! - by mudmin - 08-21-2017, 01:47 PM
HELP!!!! - by Katronix - 08-21-2017, 02:15 PM
HELP!!!! - by mudmin - 08-21-2017, 02:17 PM
HELP!!!! - by Katronix - 08-21-2017, 02:28 PM
HELP!!!! - by Katronix - 08-22-2017, 01:36 AM
HELP!!!! - by mudmin - 08-22-2017, 11:08 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)