Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Foolish php update db error 3

Status
Not open for further replies.

WilliamMute007

Programmer
Sep 30, 2007
116
GB
Can anybody please help my foolishness pls? For the life of me, I cant really spot why my DB is not updating.

Code:
<?php
//turn on error tracking
ini_set('display_errors', true);
error_reporting(E_ALL);

//get connection variables
require_once('connection.php');

//connect to database server
mysql_connect($hostname_Connection, $username_Connection, $password_Connection) or die("Unable to connect to db " . mysql_error());

//connect to database
mysql_select_db($database_Connection)
            or die("unable to select database. ". mysql_error());

//check if form submitted
if(isset($_POST['submit'])){
 //create escaped variables
 $heading = mysql_real_escape_string($_POST['heading']);
 $summary = mysql_real_escape_string($_POST['summary']);
  $news = mysql_real_escape_string($_POST['news']);
 $author = mysql_real_escape_string($_POST['author']);



 
 //construct query
 
 
$query="INSERT INTO `voiceofhop3`.`news` (`id`,`heading`,`summary`,`news`,`author`, `date`)  VALUES (NULL,'$heading','$summary','$news','$author',NOW())";
 //run query
 $result=mysql_query($query);
 if (!$result) { die (mysql_error()); }
 
 //success
 die("<META http-equiv=\"Refresh\" content=\"0;url=/index.php\">");
 echo "Process successful";
} else {
 echo 'Please referesh your browser';
 echo "<hr/> hmmmm  <br/><pre>" . print_r($_POST, true);
}
?>

Please help :(
 
There's nothing in that code that updates anything. You are INSERTING new rows every time.

Perhaps you can explain a bit more what is not happening and whether or not you get any errors.

Assuming your table name is voiceofhop3news why are you separating the strings? There's no point in doing that.


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Thanks vacunita. Actually, I dont mean update, I meant to say insert. I simply wanted to insert a few values from a form into a table called "news" in the voiceofhop3 database.

Thanks for your help with this.
 
Can you answer Phil's question, please?

Perhaps you can explain a bit more what is not happening and whether or not you get any errors.

Andrew
Hampshire, UK
 
I thought I gave an explanation? no? Ok let me have another go :)

I dont get any error message, the screen just echo's the array of data sent from the form and that's it. I actually want it to populate the database with these information NOT display them on the screen as it is doing right now.
 
if there is a successful insert the browser is immediately redirected.
You will never see a message saying 'successful' because of the die();

if you are seeing anything on your screen then it is because the $_POST['submit'] variable is not set. perhaps you named it 'Submit' or something else.
 
Hi Justin,

I've tried that too (renaming the submit button). It doesnt solve it :(

If it would help, here is my form

Code:
		<form action="cms_new_news_process.php" method="post" id="contactform">
											<p>Your Information</p>
											<p>
												<label for="summary">News Header *</label>
											</p>
									
											<pre><input type="text" name="heading2" id="heading2" value="" size="22" />
											</pre>
						
                        
                        <p>
												<label for="summary">Summary in BRIEF *</label>
												<input type="text" name="summary" id="summary" value="" size="22" />
										  </p>
									
											<pre></pre>
                        
                        
			  <p>
												<label for="news">Message *</label>
												<textarea name="news" id="news" cols="58" rows="10"></textarea>
										  </p>
											<pre></pre>
                                            
                                          <p>
											  <label for="author">Announcer *</label>
												<input type="text" name="author" id="author" value="" size="22" />
										  </p>
										
											<pre></pre>
											<div class="loading"></div>
							
											<div>
                                            
                                            <input type="submit" class="button" value="submit" />
                                            
                                            </div>
										</form>

and my retrieving of the posted info

Code:
if(isset($_POST['submit'])){
 //create escaped variables
 $heading = mysql_real_escape_string($_POST['heading']);
 $summary = mysql_real_escape_string($_POST['summary']);
  $news = mysql_real_escape_string($_POST['news']);
 $author = mysql_real_escape_string($_POST['author']);
{/CODE]

Thanks
 
try getting rid of the last few lines and ending with this

Code:
echo $query;
mysql_query($query) or die(mysql_error());
echo 'Data inserted at record ' . mysql_insert_id();

also explicitly set error reporting at the start of the script
Code:
error_reporting(E_ALL); ini_set('display_errors', true);
 
Hi Justin,

I just tried that but now the pageis just blank, no information is displayed. Here is what the code looks like now

Code:
<?php
//turn on error tracking
error_reporting(E_ALL); ini_set('display_errors', true);
//ini_set('display_errors', true);
//error_reporting(E_ALL);

//get connection variables
require_once('connection.php');

//connect to database server
mysql_connect($hostname_Connection, $username_Connection, $password_Connection) or die("Unable to connect to db " . mysql_error());

//connect to database
mysql_select_db($database_Connection)
            or die("unable to select database. ". mysql_error());

//check if form submitted
if(isset($_POST['Submit'])){
 //create escaped variables
 $heading = mysql_real_escape_string($_POST['heading']);
 $summary = mysql_real_escape_string($_POST['summary']);
  $news = mysql_real_escape_string($_POST['news']);
 $author = mysql_real_escape_string($_POST['author']);



 
 //construct query
 
 
$query="INSERT INTO `voiceofhop3`.`news` (`id`,`heading`,`summary`,`news`,`author`, `date`)  VALUES (NULL,'$heading','$summary','$news','$author',NOW())";
 //run query
 mysql_query($query) or die(mysql_error());
echo 'Data inserted at record ' . mysql_insert_id();
 }
?>
 
well here you are testing for Submit whereas your form code is submit

let's try this

Code:
<?php
//turn on error tracking
ini_set('display_errors', true);
error_reporting(E_ALL);

//get connection variables
require_once('connection.php');

//connect to database server
mysql_connect($hostname_Connection, $username_Connection, $password_Connection) 
	or die("Unable to connect to db " . mysql_error());

//connect to database
mysql_select_db($database_Connection)
	or die("unable to select database. ". mysql_error());

//profile the form data
$fields = array('heading','summary','news','author');

//check for form submission
$test = 'Submit';
//check if form submitted
if(isset($_POST[$test])):
	foreach ($fields as $field):
		$$field = isset($_POST[$field]) ? mysql_real_escape_string(trim ($_POST[$field])) : '';
	endforeach;
 
	$query="INSERT INTO `voiceofhop3`.`news` (`id`,`heading`,`summary`,`news`,`author`, `date`)  VALUES (NULL,'$heading','$summary','$news','$author',NOW())";
 	//run query
 	mysql_query($query) or die(mysql_error() . "\nQuery was: $query");
	echo 'Data inserted at record ' . mysql_insert_id();
else:
	echo "<pre>The field $test was not submittted.\nThese are the submitted fields:\n".print_r($_POST, true) ."</pre>";
endif;
?>
 
Hi Justin,

I have tried that and this is the message:

"The field Submit was not submittted.
These are the submitted fields:
Array
(
[heading2] => Test Heading
[summary] => This is a brief summary
[news] => This is the message
[author] => The author
)"

Thanks
 
then you are not submitting any 'submit' button.

so I suspect that the data is being sent to the browser by javascript or similar. why not share the full code for the form?
 
Hi Justin,

Here is the code for the form

Code:
	<div class="form">
										<form action="cms_new_news_process.php" method="post" id="contactform">
											<p>Your Information</p>
											<p>
												<label for="summary">News Header *</label>
											</p>
									
											<pre><input type="text" name="heading2" id="heading2" value="" size="22" />
											</pre>
						
                        
                        <p>
												<label for="summary">Summary in BRIEF *</label>
												<input type="text" name="summary" id="summary" value="" size="22" />
										  </p>
									
											<pre></pre>
                        
                        
			  <p>
												<label for="news">Message *</label>
												<textarea name="news" id="news" cols="58" rows="10"></textarea>
										  </p>
											<pre></pre>
                                            
                                          <p>
											  <label for="author">Announcer *</label>
												<input type="text" name="author" id="author" value="" size="22" />
										  </p>
										
											<pre></pre>
											<div class="loading"></div>
											
											<div>
                                            <input type="Submit" class="button" value="Submit" />
                                            
                                            </div>
										</form>
 
Hi

Actually jpadie was right on 13 Apr 11 16:22 :
jpadie said:
if you are seeing anything on your screen then it is because the $_POST['submit'] variable is not set. perhaps you named it 'Submit' or something else.
WilliamMute007, nameless [tt]form[/tt] elements can not be submitted.


Feherke.
 
nope. that is definitely not the code for the form that is being submitted.
If it were, then there would be an entry for "Submit' in the POST array.
please supply the whole of the browser rendered code for the page. i.e. copy and past the view-source from a web browser.
 
Isnt it? umm. Here is the page render:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
	<head>
		<meta content="text/html;charset=utf-8" http-equiv="content-type" />
		<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
		<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
		<link id="stylesheet" rel="stylesheet" href="css/blue.css" type="text/css" title="main" media="screen" />
		<link rel="stylesheet" href="css/styles/pretty-photo.css" type="text/css" />
		<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>

		<script src="js/jquery.cookie.js" type="text/javascript"></script>
		<script type="text/javascript">
			<!--
			$(document).ready(function(){
				var cookieStyle = 'style';
				var def = $("link#stylesheet").attr('href');
				var cookieOptions = {expires: 7, path: '/'};
				if($.cookie(cookieStyle) != null){ 
					$("#styleswitcher").parent().find('span').remove(); 
					$col = $.cookie(cookieStyle).replace('_', ' ');
					$("link#stylesheet").attr({ href: "css/" + $.cookie(cookieStyle) + ".css" }); 
					$("#styleswitcher").parent().append('<span> &nbsp; Selected color scheme is "<span style="text-transform:capitalize;">' + $col + '"</span></span>'); 
				}
				$("#styleswitcher").change(function(e){
					var $bh = $('body').height();
					$('body').append('<div id="load"></div>');
					$('#load').css({ zIndex: '1000', display: 'none', position: 'absolute', top: '0', left: '0', width: '100%', height: $bh, background: '#333 url(images/loader.gif) no-repeat center 400px', display: 'block' }).fadeIn(1000).delay(3000);
					e.preventDefault();
					$.cookie(cookieStyle, $("#styleswitcher option:selected").val(), cookieOptions);
					$("link#stylesheet").attr({ href: "css/" + $.cookie(cookieStyle) + ".css" });
					if($( "#styleswitcher").parent().find('span') ){ $("#styleswitcher").parent().find('span').remove(); } 
					$col = $.cookie(cookieStyle).replace('_', ' '); 
					$("#styleswitcher").parent().append('<span> &nbsp; Selected color scheme is "<span style="text-transform:capitalize;">' + $col + '"</span></span>'); 
					if( $('#middle .navigation .wp-pagenavi a img').parent() ){ 
						$('#middle .navigation .wp-pagenavi a img').parent().removeClass('hov');
						$('#middle .navigation .wp-pagenavi a:first img').attr({ src: 'css/' + $.cookie(cookieStyle) + '/pager_prev.png' });
						$('#middle .navigation .wp-pagenavi a:last img').attr({ src: 'css/' + $.cookie(cookieStyle) + '/next_prev.png' });
					}
					$('#load').fadeOut(1000, function(){ $(this).remove(); });
				});
				if( $('#middle .navigation .wp-pagenavi a img').parent() && $.cookie(cookieStyle) ){ 
					$('#middle .navigation .wp-pagenavi a img').parent().removeClass('hov');
					$('#middle .navigation .wp-pagenavi a:first img').attr({ src: 'css/' + $.cookie(cookieStyle) + '/pager_prev.png' });
					$('#middle .navigation .wp-pagenavi a:last img').attr({ src: 'css/' + $.cookie(cookieStyle) + '/next_prev.png' });
					$('#middle .navigation .wp-pagenavi a:first img').parent().hover(function(){
						$(this).find('img').removeAttr('src').attr({ src: 'css/' + $.cookie(cookieStyle) + '/pager_prev_sel.png' });
					}, function(){
						$(this).find('img').removeAttr('src').attr({ src: 'css/' + $.cookie(cookieStyle) + '/pager_prev.png' });
					});
					$('#middle .navigation .wp-pagenavi a:last img').parent().hover(function(){
						$(this).find('img').removeAttr('src').attr({ src: 'css/' + $.cookie(cookieStyle) + '/pager_next_sel.png' });
					}, function(){
						$(this).find('img').removeAttr('src').attr({ src: 'css/' + $.cookie(cookieStyle) + '/pager_next.png' });
					});
				} else if( $('#middle .navigation .wp-pagenavi a img').parent() ){ 
					$('#middle .navigation .wp-pagenavi a img').parent().removeClass('hov');
					$('#middle .navigation .wp-pagenavi a:first img').attr({ src: 'css/blue/pager_prev.png' });
					$('#middle .navigation .wp-pagenavi a:last img').attr({ src: 'css/blue/next_prev.png' });
					$('#middle .navigation .wp-pagenavi a:first img').parent().hover(function(){
						$(this).find('img').removeAttr('src').attr({ src: 'css/blue/pager_prev_sel.png' });
					}, function(){
						$(this).find('img').removeAttr('src').attr({ src: 'css/blue/pager_prev.png' });
					});
					$('#middle .navigation .wp-pagenavi a:last img').parent().hover(function(){
						$(this).find('img').removeAttr('src').attr({ src: 'css/blue/pager_next_sel.png' });
					}, function(){
						$(this).find('img').removeAttr('src').attr({ src: 'css/blue/pager_next.png' });
					});
				}
			});
			//-->
		</script>
		<script src="js/jquery-ui.min.js" type="text/javascript"></script>
		<script src="js/jquery.pretty_photo.js" type="text/javascript"></script>
		<script src="js/script.js" type="text/javascript"></script>
		<!--[if IE]>
			<script src="js/ie.js" type="text/javascript"></script>
			<link rel="stylesheet" href="css/styles/ie.css" type="text/css" />
		<![endif]-->

		<!--[if lt IE 7]>
			<script src="js/DD_belatedPNG.js" type="text/javascript"></script>
			<script type="text/javascript">
				DD_belatedPNG.fix('div, img, a, li');
			</script>
		<![endif]-->
		<script src="js/cufon-yui.js" type="text/javascript"></script>
		<script src="js/MyriadPro_All.font.js" type="text/javascript"></script>
		<script type="text/javascript">
			Cufon.replace ('#middle h1 a, #middle h2 a, #middle h3 a, #middle h4 a, #middle h5 a, #middle h6 a', { hover: { color: '#2cbffd', textShadow: '1px 1px rgba(255, 255, 255, 0.4)' }, color: '##191919', textShadow: '1px 1px rgba(255, 255, 255, 0.4)' });
			Cufon.replace ('.tabs a, .tog a', { hover: { color: '#2cbffd' }, color: '#feffff' });
			Cufon.replace ('h1, h2, h3, h4, h5, h6', { hover: { color: '#fefffe', textShadow: '1px 1px rgba(0, 0, 0, 0.4)' }, color: '#171617', textShadow: '1px 1px rgba(255, 255, 255, 0.4)' });
			Cufon.replace ('#navigation li a, .toggle a, .date, #slider h1, #slider h2, #slider h3, #slider h4, #slider h5, #slider h6, #middle_bottom h1, #middle_bottom h2, #middle_bottom h3, #middle_bottom h4, #middle_bottom h5, #middle_bottom h6, #bottom h1, #bottom h2, #bottom h3, #bottom h4, #bottom h5, #bottom h6', { hover: { textShadow: '1px 1px rgba(0, 0, 0, 0.3)' }, color: '#fefffe', textShadow: '1px 1px rgba(0, 0, 0, 0.3)' });
			Cufon.replace ('#footer .links a', { hover: { color: '#fefefe' }, color: '#898989', textShadow: '1px 1px rgba(0, 0, 0, 0.3)' });
			Cufon.replace ('#middle a.button', { hover: { color: '#fffffe', textShadow: '1px 1px rgba(0, 0, 0, 0.4)' }, color: '#feffff', textShadow: '1px 1px rgba(0, 0, 0, 0.4)' });
			Cufon.replace ('blockquote');
		</script>
		<title>Blakesley</title>
	</head>
	<body>

<!-- _________________________ Start Page _________________________ -->
		<div id="page">

<!-- _________________________ Start Container _________________________ -->
			<div id="container">

<!-- _________________________ Start Header _________________________ -->
				<div id="header">
					<div class="changer" style="position:absolute; top:5px; left:0; color:#fffffe; z-index:500;">
						Change color: &nbsp; &nbsp;

						<select id="styleswitcher" name="styleswitcher" style="width:150px; line-height:1em;">
							<option value="blue">Blue</option>
							<option value="light_blue">Light Blue</option>
							<option value="strong_blue">Storng Blue</option>
							<option value="deep_blue">Deep Blue</option>
							<option value="brown">Brown</option>

							<option value="green">Green</option>
							<option value="light_green">Light Green</option>
							<option value="strong_green">Storng Green</option>
							<option value="grey">Grey</option>
							<option value="orange">Orange</option>
							<option value="purple">Purple</option>

							<option value="light_purple">Light Purple</option>
							<option value="red">Red</option>
							<option value="violet">Violet</option>
							<option value="deep_violet">Deep Violet</option>
							<option value="yellow">Yellow</option>
						</select>

					</div>
					<a class="logo" title="Blakesley" href="index.html"><img alt="Blakesley" src="images/logo.png" /></a>
					<a href="[URL unfurl="true"]http://www.google.com?iframe=true&amp;width=100%&amp;height=100%"[/URL] rel="prettyPhoto" class="user" title="User Area">User Area</a>

<!-- _________________________ Start Navigation _________________________ -->
					<ul id="navigation">
						<li><a href="index.html">Home</a>
							<ul>
								<li><a href="index_coin.html">Home Coin Slider</a></li>

								<li><a href="index_accordion.html">Home Accordion</a></li>
								<li><a href="index_video.html">Home Video</a></li>
							</ul>
						</li>
						<li><a href="about.html">About</a>
							<ul>
								<li><a href="services.html">Services</a></li>

								<li><a href="news.html">News</a></li>
								<li><a href="testimonials.html">Testimonials</a></li>
								<li><a href="fwidth.html">Layouts</a>
									<ul>
										<li><a href="sitemap.html">Sitemap</a></li>
										<li><a href="error.html">404 Error Page</a></li>

										<li><a href="lsidebar.html">Left Sidebar</a></li>
										<li><a href="rsidebar.html">Right Sidebar</a></li>
										<li><a href="fwidth.html">Full Width</a></li>
									</ul>
								</li>
								<li><a href="shortcodes.html">Shortcodes</a>
									<ul>

										<li><a href="shortcodes.html">Basic Shortcodes</a></li>
										<li><a href="tabs.html">Tabs &amp; Toggle</a></li>
										<li><a href="boxes.html">InfoBoxes</a></li>
										<li><a href="columns.html">Columns</a></li>
										<li><a href="typography.html">Typography</a></li>

									</ul>
								</li>
							</ul>
						</li>
						<li><a href="products.html">Products</a>
							<ul>
								<li><a href="product.html">Product</a></li>
							</ul>

						</li>
						<li><a href="portfolio.html">Portfolio</a>
							<ul>
								<li><a href="portfolio.html">Sortable Portfolio</a></li>
								<li><a href="portfolio_one.html">One Column Portfolio</a></li>
								<li><a href="portfolio_two.html">Two Columns Portfolio</a></li>
								<li><a href="portfolio_three.html">Three Columns Portfolio</a></li>

								<li><a href="portfolio_four.html">Four Columns Portfolio</a></li>
								<li><a href="project.html">Project</a></li>
							</ul>
						</li>
						<li><a href="gallery.html">Gallery</a>
							<ul>
								<li><a href="gallery.html">Sortable Gallery</a></li>

								<li><a href="gallery_two.html">Two Columns Gallery</a></li>
								<li><a href="gallery_three.html">Three Columns Gallery</a></li>
								<li><a href="gallery_four.html">Four Columns Gallery</a></li>
								<li><a href="album.html">Album</a></li>
							</ul>
						</li>
						<li><a href="blog.html">Blog</a>

							<ul>
								<li><a href="post.html">Post</a></li>
							</ul>
						</li>
						<li class="current_page_item"><a href="contacts.html">Contacts</a></li>
					</ul>
<!-- _________________________ Finish Navigation _________________________ -->

					

<!-- _________________________ Start Search _________________________ -->
					<div class="search">
						<form action="#">
							<div class="field"><input type="text" name="search" id="search" value="Search..." /></div>
							<div class="sbut"><input type="submit" value="" /></div>
						</form>
					</div>
<!-- _________________________ Finish Search _________________________ -->

				</div>

<!-- _________________________ Finish Header _________________________ -->


<!-- _________________________ Start Middle _________________________ -->
				<div id="middle">
					<div class="middle_top"></div>
					<div class="middle">
						<div class="middle_bg">
							<div class="middle_head"></div>

<!-- _________________________ Start Breadcrumb _________________________ -->
							<div id="breadcrumb">

								<a href="index.html"><span>Home</span></a> / 
								<span class="bred"><span>Contacts</span></span>
							</div>
<!-- _________________________ Finish Breadcrumb _________________________ -->

					
<!-- _________________________ Start Content _________________________ -->
							<div id="content">
								<h1 class="headline">Contacts</h1>

								<div class="content">
									<p>Lorem ipsum dolor sit amet, consec tetuer adipiscing elit. Praesent vestibu lum mo lestie lacus. Aenean nonummy hendrerit mauris. Phasellus porta. Fusce suscipit varius um sociis natoque pena tibus et magnis dis parturient montes</p>
									<p>Required fields are marked *</p>
									<br />
									<div class="form">
										<form action="cms_new_news_process.php" method="post" id="contactform">
											<p>Your Information</p>

											<p>
												<label for="summary">News Header *</label>
											</p>
									
											<pre><input type="text" name="heading2" id="heading2" value="" size="22" />
											</pre>
						
                        
                        <p>
												<label for="summary">Summary in BRIEF *</label>
												<input type="text" name="summary" id="summary" value="" size="22" />

										  </p>
									
											<pre></pre>
                        
                        
			  <p>
												<label for="news">Message *</label>
												<textarea name="news" id="news" cols="58" rows="10"></textarea>
										  </p>
											<pre></pre>
                                            
                                          <p>

											  <label for="author">Announcer *</label>
												<input type="text" name="author" id="author" value="" size="22" />
										  </p>
										
											<pre></pre>
											<div class="loading"></div>
											
											<div>
                                            <input type="Submit" class="button" value="Submit" />
                                            
                                            </div>

										</form>
									</div>
								</div>
							</div>
<!-- _________________________ Finish Content _________________________ -->


<!-- _________________________ Start Sidebar _________________________ -->
							<div id="sidebar">
								<div class="widget widget_nav_menu">
									<h3>Our Address</h3>

									<p>1234 Address City, 56789<br /><br />City, Country<br />Email: <a href="mailto:cmsmstrs@gmail.com">cmsmstrs@gmail.com</a><br />Website: <a href="[URL unfurl="true"]http://cmsmasters.net/">http://cmsmasters.net</a><br[/URL] />Phone: 1-800-235-6987</p>
								</div>
								<div id="location-widget" class="widget">
									<h3>Location</h3>
									<iframe width="260" height="280" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="[URL unfurl="true"]http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Franklin+Blakesley+St&amp;sll=29.781215,-91.515427&amp;sspn=0.113679,0.222988&amp;g=Willow+St,+Franklin,+Louisiana&amp;ie=UTF8&amp;hq=&amp;hnear=Blakesley+St,+Franklin,+St+Mary,+Louisiana+70538&amp;ll=29.805795,-91.501608&amp;spn=0.020853,0.02223&amp;z=14&amp;iwloc=A&amp;output=embed"></iframe>[/URL]

									<br />
									<a class="all" href="[URL unfurl="true"]http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=Franklin+Blakesley+St&amp;sll=29.781215,-91.515427&amp;sspn=0.113679,0.222988&amp;g=Willow+St,+Franklin,+Louisiana&amp;ie=UTF8&amp;hq=&amp;hnear=Blakesley+St,+Franklin,+St+Mary,+Louisiana+70538&amp;ll=29.805795,-91.501608&amp;spn=0.020853,0.02223&amp;z=14&amp;iwloc=A"[/URL] style="display:block; float:left; margin:10px 0 0">View Larger Map</a>
								</div>
							</div>
<!-- _________________________ Finish Sidebar _________________________ -->

						</div>
						<div class="middle_bot"></div>
					</div>

				</div>
<!-- _________________________ Finish Middle _________________________ -->


<!-- _________________________ Start Middle Bottom _________________________ -->
				<div id="middle_bottom">
					<div id="test-widget" class="widget">
						<script src="js/jquery.cycle.all.latest.js" type="text/javascript"></script>
						<script type="text/javascript">$('#test-widget ul').cycle({ fx: 'scrollUp', speed: 500, timeout: 5000, next: '#next_test', prev: '#prev_test', cleartype: true, cleartypeNoBg: true });</script>
						<h3>Testimonials</h3>

						<div class="nav">
							<span id="prev_test"></span>
							<span id="next_test"></span>
						</div>
						<ul>
							<li>
								<p>Does The Future Of The Internet Have Room For Web Designers? Lorem ipsum dolor sit amet, consec tetuer adipiscing elit. Praesent vestibu lum molestie lacus1</p>
								<strong>Joe Cole, Liverpool</strong>

							</li>
							<li>
								<p>Does The Future Of The Internet Have Room For Web Designers? Lorem ipsum dolor sit amet, consec tetuer adipiscing elit. Praesent vestibu lum molestie lacus2</p>
								<strong>Joe Cole, Liverpool</strong>
							</li>
							<li>
								<p>Does The Future Of The Internet Have Room For Web Designers? Lorem ipsum dolor sit amet, consec tetuer adipiscing elit. Praesent vestibu lum molestie lacus3</p>

								<strong>Joe Cole, Liverpool</strong>
							</li>
						</ul>
					</div>
					<div class="two_third">
						<h3>Product Features</h3>
						<ul>
							<li>Valid XHTML </li>

							<li>Cross Browser Compatible</li>
							<li>Well Documented</li>
							<li>16 Color Schemes</li>
						</ul>
						<ul>
							<li>6 Cufon Fonts</li>
							<li>PrettyPhoto 2.0 Lightbox</li>

							<li>Different Shortcodes</li>
							<li>Bottom Content Toggle</li>
						</ul>
						<ul>
							<li>3 Different Homepage Sliders</li>
							<li>Ajax Portfolio Sort &amp; Filter</li>

							<li>Ajax Portfolio Layout Changer</li>
							<li>Ajax Contact Form &amp; Validation</li>
						</ul>
					</div>
				</div>
<!-- _________________________ Finish Middle Bottom _________________________ -->

			</div>

<!-- _________________________ Finish Container _________________________ -->


<!-- _________________________ Start Bottom _________________________ -->
			<div id="bottom">
				<div class="toggle">
					<a class="show" href="#">more widgets</a>
					<a class="hide" href="#">close</a>
				</div>
				<div class="bot_container">

					<div class="bottom">
						<div class="widget widget_categories">
							<h3>Categories</h3>
							<ul>
								<li><a href="blog.html">Business</a></li>
								<li><a href="blog.html">Solutions</a></li>
								<li><a href="blog.html">Online Marketing</a></li>

								<li><a href="blog.html">Management</a></li>
								<li><a href="blog.html">Business Strategies</a></li>
								<li><a href="blog.html">Research</a></li>
								<li><a href="blog.html">Consulting</a></li>
							</ul>
						</div>
						<div class="widget widget_archive">

							<h3>Archives</h3>
							<ul>
								<li><a href="blog.html">October 2010</a></li>
								<li><a href="blog.html">September 2010</a></li>
								<li><a href="blog.html">August 2010</a></li>
								<li><a href="blog.html">July 2010</a></li>

							</ul>
						</div>
						<div id="twitter-widget" class="widget">
							<h3>Twitter</h3>
							<ul>
								<li>
									Lorem ipsum dolor sit amet, consec tetuer adipiscing elit. Praesent vestibu
									<br />
									<small><a href="#">24 days ago</a></small>

								</li>
								<li>
									Lorem ipsum dolor sit amet, consec tetuer elit. Praesent vestibu
									<br />
									<small><a href="#">1 month ago</a></small>
								</li>
								<li>
									Praesent vestibu lum mo lestie lacus. Aenean nonummy hendrerit mauris
									<br />

									<small><a href="#">2 month ago</a></small>
								</li>
							</ul>
						</div>
					</div>
				</div>
			</div>
<!-- _________________________ Finish Bottom _________________________ -->

<!-- _________________________ Start Footer _________________________ -->
			<div id="footer">
				<div class="footer">
					<div class="links">
						<a href="#"><img src="images/facebook.png" alt="" /> Facebook</a>
						<a href="#"><img src="images/twitter.png" alt="" /> Twitter</a>
						<a href="#"><img src="images/rss.png" alt="" /> RSS</a>

					</div>
					<p>Blakesley &copy; 2010 | All Rights Reserved</p>
				</div>
			</div>
<!-- _________________________ Finish Footer _________________________ -->

		</div>
<!-- _________________________ Finish Page _________________________ -->

	</body>
</html>
 
Lots of js....
Load the page in ff disable JavaScript and then submit the form.
That should work. If it does then you need to look at your js. Probably in script.js.
 
As feherek points out:
feherke said:
WilliamMute007, nameless form elements can not be submitted.

Your submit button still doesn't have a name.

Code:
...
 <pre></pre>
                                            <div class="loading"></div>
                                            
                                            <div>
                                            [red]<input type="Submit" class="button" value="Submit" />[/red]
                                            
                                            </div>
...


If you are checking for $_POST['Submit'] or $_POST['submit'] there needs to be an element with that name.

At this point though I have no idea what you are checking for anymore. However giving your submit button a name and checking for that name in your If statement should make it work.

Code:
 <pre></pre>
                                            <div class="loading"></div>
                                            
                                            <div>
                                            <input type="Submit" class="button" value="Submit" [red]name='submit'[/red] />
                                            
                                            </div>


Then this will evaluate to true instead of false, and run the rest of your code:
Code:
if(isset($_POST['[red]submit[/red]'])){
...


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
FAAAANTASTICA!! Vacunita you are a star! I cant beleive Feherke pointed it out earlier but I foolishly missed that point (slap myself). I knew it had to be something so minute like that gosh! lol. Thanks Justin also for your valuable help too. You all rock!
 
I had assumed you were working on the other form. As that one had named elements.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top