Jump to content

Stainystain

Members
  • Posts

    17
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Stainystain's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Physco, thanks so much for your help and advice. I must stress, this is all just a tester, thus the local host and name of database and table - i'm still very much fiddling with the best way to do this! I will very much take on your advice and normalise the tables, but for the time being I have simplified it to get to the bottom of the current issue... It's giving me the following error: Error: Column count doesn't match value count at row 1 <? $username="xxxxxx"; $password="xxxxxx"; $database="Final"; $date=$_POST['date']; $group_name=$_POST['group_name']; $cruise=$_POST['cruise']; $no_adults=$_POST['no_adults']; $no_half=$_POST['no_half']; $no_free=$_POST['no_free']; $email=$_POST['email']; $phone=$_POST['phone']; $accommodation=$_POST['accommodation']; $payment=$_POST['payment']; $info=$_POST['info']; mysql_connect('localhost',$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "INSERT INTO guest VALUES ('$date','$group_name','$cruise','$no_adults','$no_half','$no_free','$email','$phone','$accommodation','$payment','$info')"; mysql_query($query) or die("Query: {$query}<br>Error: " . mysql_error()); mysql_close(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="robots" content="noindex" /> <title>Guest Entry Form - Friendship Rose</title> <script language="JavaScript"> function disableEnterKey(e) { var key; if(window.event) key = window.event.keyCode; //IE else key = e.which; //firefox if(key == 13) return false; else return true; } </script> <link href="guest_form.css" rel="stylesheet" type="text/css" /> </head> <body> <h1 style="padding-left:30px"> Friendship Rose Guest Info </h1> <p style="padding-left:30px"> <b>Note:</b> The Tab Button scrolls through the form fields (mouse click can also be used), the return key creates a new line for text in the text fields </hp> <p> </p> <div class="form" style="float:left; padding:0 0 30px 30px"> <form name="guest_form" action="guest_form.php" method="post" style="float:left"> Cruise Date: dd/mm/yy (IMPORTANT) <br /> <input type="date" name="date" size="30" onKeyPress="return disableEnterKey(event)" /><br /><br /> Cruise <br /> <input type="radio" name="cruise" value="tobagocays">Tobago Cays<br> <input type="radio" name="cruise" value="mustique">Mustique<br /> <input type="radio" name="cruise" value="mayreau">Mayreau<br> <input type="radio" name="cruise" value="st_vincent">St Vincent<br /> <input type="radio" name="cruise" value="bequia">Bequia<br> <p> </p> Group Name / Identification (Surname) <input type="text" id="group_name" size="40" name="group_name" value="" placeholder="Group Name" onKeyPress="return disableEnterKey(event)" /> <p> </p> Number of Adults:<br /> <input type="number" name="no_adults" min="1" onKeyPress="return disableEnterKey(event)" /> <br /><br /> Number of Kids - Half Price: (Use 0 for none)<br /> <input type="number" name="no_half" min="0" onKeyPress="return disableEnterKey(event)" /> <br /><br /> Number of Kids - Free: (Use 0 for none)<br /> <input type="number" name="no_free" min="0" onKeyPress="return disableEnterKey(event)" /> <p> </p> Contact Email:<br /> <input type="email" id="email" size="40" name="email" value="" placeholder="Contact Email" onKeyPress="return disableEnterKey(event)" /><Br /><Br /> Contact Phone Number:<Br /> <input type="number" id="phone" size="40" name="phone" value="" placeholder="Phone Number" onKeyPress="return disableEnterKey(event)" /><br /><br /> <p> </p> Accommodation: <br /> <textarea name="accommodation" rows="5" cols="60" input type="text"></textarea> <p> </p> Payment Status: <br /> <textarea name="payment" rows="2" cols="40" input type="text"></textarea> <p> </p> Extra Info / Dietry Requirements: <br /> <textarea name="info" rows="10" cols="60" input type="text"></textarea> <br /> <p> </p> <input type="Submit" value="Submit" /> </form> </div> </body> </html>
  2. Barand - any advice on how to normalise the database? I presume you have an issue with the names... Each entry is one group - how would you then record each passengers name in that group? A table inside a table? How would that make it better? Thanks for your reply,
  3. xampp 1.8.3-3 Mac OSX 10.9.1 Hello, I'm creating a form using html and php, which when run uploads information into a locally hosted xampp database. The issue; sometimes the table simply refuses the information - it doesn't show up in the database when sent and continues to do so and I cannot get it working again. I'm given no errors when the data is submitted so it must be connecting, the info just doesn't show up. Because of this I decided to start from the beginning again, creating a new database and table, and starting with one input (date) - it works. I add more and more fields and it continues to work... I add a couple of the dynamic name fields (see code below) and it continues to work. I get confident so add the rest of my fields - bam, it stops working. After it stops accepting data, I can't get it accepting again - even if I delete all fields so I just have "date". Am I hitting some limit somehow? I do apologise if the code is appalling - this isn't my day job! Any help anybody can give me will be greatly appreciated, and will stop me tearing my hair out! Many thanks Simon <? $username="xxxxxx"; $password="xxxxxx"; $database="Final"; $date=$_POST['date']; $group_name=$_POST['group_name']; $cruise=$_POST['cruise']; $no_adults=$_POST['no_adults']; $no_half=$_POST['no_half']; $no_free=$_POST['no_free']; $email=$_POST['email']; $phone=$_POST['phone']; $accommodation=$_POST['accommodation']; $payment=$_POST['payment']; $info=$_POST['info']; $name_adult=$_POST['name_adult']; $name_adult_2=$_POST['name_adult_2']; $name_adult_3=$_POST['name_adult_3']; $name_adult_4=$_POST['name_adult_4']; $name_adult_5=$_POST['name_adult_5']; $name_adult_6=$_POST['name_adult_6']; $name_adult_7=$_POST['name_adult_7']; $name_adult_8=$_POST['name_adult_8']; $name_adult_9=$_POST['name_adult_9']; $name_adult_10=$_POST['name_adult_10']; $name_adult_11=$_POST['name_adult_11']; $name_adult_12=$_POST['name_adult_12']; $name_adult_13=$_POST['name_adult_13']; $name_adult_14=$_POST['name_adult_14']; $name_adult_15=$_POST['name_adult_15']; $name_half=$_POST['name_half']; $name_half_2=$_POST['name_half_2']; $name_half_3=$_POST['name_half_3']; $name_half_4=$_POST['name_half_4']; $name_half_5=$_POST['name_half_5']; $name_half_6=$_POST['name_half_6']; $name_half_7=$_POST['name_half_7']; $name_half_8=$_POST['name_half_8']; $name_half_9=$_POST['name_half_9']; $name_half_10=$_POST['name_half_10']; $name_half_11=$_POST['name_half_11']; $name_half_12=$_POST['name_half_12']; $name_half_13=$_POST['name_half_13']; $name_half_14=$_POST['name_half_14']; $name_half_15=$_POST['name_half_15']; $name_free=$_POST['name_free']; $name_free_2=$_POST['name_free_2']; $name_free_3=$_POST['name_free_3']; $name_free_4=$_POST['name_free_4']; $name_free_5=$_POST['name_free_5']; $name_free_6=$_POST['name_free_6']; $name_free_7=$_POST['name_free_7']; $name_free_8=$_POST['name_free_8']; $name_free_9=$_POST['name_free_9']; $name_free_10=$_POST['name_free_10']; $name_free_11=$_POST['name_free_11']; $name_free_12=$_POST['name_free_12']; $name_free_13=$_POST['name_free_13']; $name_free_14=$_POST['name_free_14']; $name_free_15=$_POST['name_free_15']; $email_2=$_POST['email_2']; $email_3=$_POST['email_3']; $email_4=$_POST['email_4']; $phone_2=$_POST['phone_2']; $phone_3=$_POST['phone_3']; $phone_4=$_POST['phone_4']; mysql_connect('localhost',$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "INSERT INTO final VALUES ('$date','$group_name','$cruise','$no_adults','$no_half','$no_free','$email','$phone','$accommodation','$payment','$info','$name_adult','$name_adult_2','$name_adult_3','$name_adult_4','$name_adult_5','$name_adult_6','$name_adult_7','$name_adult_8','$name_adult_9','$name_adult_10','$name_adult_11','$name_adult_12','$name_adult_13','$name_adult_14','$name_adult_15','$name_half','$name_half_2','$name_half_3','$name_half_4','$name_half_5','$name_half_6','$name_half_7','$name_half_8','$name_half_9','$name_half_10','$name_half_12','$name_half_13','$name_half_14','$name_half_15','$name_free','$name_free_2','$name_free_3','$name_free_4','$name_free_5','$name_free_6','$name_free_7','$name_free_8','$name_free_9','$name_free_10','$name_free_11','$name_free_12','$name_free_13','$name_free_14','$name_free_15','$email_2','$email_3','$email_4','$phone_2','$phone_3','$phone_4')"; mysql_query($query); mysql_close(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="robots" content="noindex" /> <title>Guest Entry Form - Friendship Rose</title> <script language="JavaScript"> function disableEnterKey(e) { var key; if(window.event) key = window.event.keyCode; //IE else key = e.which; //firefox if(key == 13) return false; else return true; } </script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> <script type="text/javascript"> $(function() { var addDiv = $('#addinputadult'); var i = $('#addinputadult p').size() + 1; $('#addNewadult').live('click', function() { $('<p><input type="text" id="adult_' + i +'" value="" size="40" name="name_adult_' + i +'" value="" placeholder="Full Name (Adult)" /><a href="#adult" id="remname_adult">Remove</a> </p>').appendTo(addDiv); i++; return false; }); $('#remname_adult').live('click', function() { if( i > 2 ) { $(this).parents('p').remove(); i--; } return false; }); }); </script> <script type="text/javascript"> $(function() { var addDiv = $('#addinputhalf'); var i = $('#addinputhalf p').size() + 1; $('#addNewhalf').live('click', function() { $('<p><input type="text" id="name_half_' + i +'" value="" size="40" name="name_half_' + i +'" value="" placeholder="Full Name (Half)" /><a href="#half" id="remname_half">Remove</a> </p>').appendTo(addDiv); i++; return false; }); $('#remname_half').live('click', function() { if( i > 2 ) { $(this).parents('p').remove(); i--; } return false; }); }); </script> <script type="text/javascript"> $(function() { var addDiv = $('#addinputfree'); var i = $('#addinputfree p').size() + 1; $('#addNewfree').live('click', function() { $('<p><input type="text" id="name_free_' + i +'" value="" size="40" name="name_free_' + i +'" value="" placeholder="Full Name (Free)" /><a href="#free" id="remname_free">Remove</a> </p>').appendTo(addDiv); i++; return false; }); $('#remname_free').live('click', function() { if( i > 2 ) { $(this).parents('p').remove(); i--; } return false; }); }); </script> <script type="text/javascript"> $(function() { var addDiv = $('#addinputemail'); var i = $('#addinputemail p').size() + 1; $('#addNewemail').live('click', function() { $('<p><input type="text" id="email_' + i +'" value="" size="40" name="email_' + i +'" value="" placeholder="Contact Email" /><a href="#email" id="remNewemail">Remove</a> </p>').appendTo(addDiv); i++; return false; }); $('#rememail').live('click', function() { if( i > 2 ) { $(this).parents('p').remove(); i--; } return false; }); }); </script> <script type="text/javascript"> $(function() { var addDiv = $('#addinputphone'); var i = $('#addinputphone p').size() + 1; $('#addNewphone').live('click', function() { $('<p><input type="text" id="phone_' + i +'" value="" size="40" name="phone_' + i +'" value="" placeholder="Phone Number" /><a href="#phone" id="remNewphone">Remove</a> </p>').appendTo(addDiv); i++; return false; }); $('#remphone').live('click', function() { if( i > 2 ) { $(this).parents('p').remove(); i--; } return false; }); }); </script> <link href="guest_form.css" rel="stylesheet" type="text/css" /> </head>[/color][/color] <body> <h1 style="padding-left:30px"> Friendship Rose Guest Info </h1> <p style="padding-left:30px"> <b>Note:</b> The Tab Button scrolls through the form fields (mouse click can also be used), the return key creates a new line for text in the text fields </hp> <p> </p> <div class="form" style="float:left; padding:0 0 30px 30px"> <form name="guest_form" action="guest_form.php" method="post" style="float:left"> Cruise Date: dd/mm/yy (IMPORTANT) <br /> <input type="date" name="date" size="30" onKeyPress="return disableEnterKey(event)" /><br /><br /> Cruise <br /> <input type="radio" name="cruise" value="tobagocays">Tobago Cays<br> <input type="radio" name="cruise" value="mustique">Mustique<br /> <input type="radio" name="cruise" value="mayreau">Mayreau<br> <input type="radio" name="cruise" value="st_vincent">St Vincent<br /> <input type="radio" name="cruise" value="bequia">Bequia<br> <p> </p> Group Name / Identification (Surname) <input type="text" id="group_name" size="40" name="group_name" value="" placeholder="Group Name" onKeyPress="return disableEnterKey(event)" /> <p> </p> Number of Adults:<br /> <input type="number" name="no_adults" min="1" onKeyPress="return disableEnterKey(event)" /> <br /><br /> Number of Kids - Half Price: (Use 0 for none)<br /> <input type="number" name="no_half" min="0" onKeyPress="return disableEnterKey(event)" /> <br /><br /> Number of Kids - Free: (Use 0 for none)<br /> <input type="number" name="no_free" min="0" onKeyPress="return disableEnterKey(event)" /> <p> </p> Names of Adults: <div id="addinputadult" style="line-height:0px"> <p> <a href="#adult" id="addNewadult">Add</a><br /> <input type="text" id="name_adult" size="40" name="name_adult" value="" placeholder="Full Name (Adult)" /> </p> </div> Names of Kids - Half: <div id="addinputhalf" style="line-height:0px"> <p> <a href="#half" id="addNewhalf">Add</a><br /> <input type="text" id="name_half" size="40" name="name_half" value="" placeholder="Full Name (Half)" /> </p> </div> Names of Kids - Free: <div id="addinputfree" style="line-height:0px"> <p> <a href="#free" id="addNewfree">Add</a><br /> <input type="text" id="name_free" size="40" name="name_free" value="" placeholder="Full Name (Free)" /> </p> </div> <p> </p> Contact Email/s: <div id="addinputemail" style="line-height:0px"> <p> <a href="#email" id="addNewemail">Add</a><br /> <input type="email" id="email" size="40" name="email" value="" placeholder="Contact Email" /> </p> </div> Contact Phone Number/s: <div id="addinputphone" style="line-height:0px"> <p> <a href="#phone" id="addNewphone">Add</a><br /> <input type="number" id="phone" size="40" name="phone" value="" placeholder="Phone Number" /> </p> </div> <p> </p> Accommodation: <br /> <textarea name="accommodation" rows="5" cols="60" input type="text"></textarea> <p> </p> Payment Status: <br /> <textarea name="payment" rows="2" cols="40" input type="text"></textarea> <p> </p> Extra Info / Dietry Requirements: <br /> <textarea name="info" rows="10" cols="60" input type="text"></textarea> <br /> <p> </p> <input type="Submit" value="Submit" /> </form> </div> </body> </html>
  4. Hey guys, Anybody have a clue why when using a template (be it with content in the editable region or not) everything above the editable region comes out blank in preview and when i load it onto the site to test it. The code is taken from the current site which is working fine (do not use a template) - it's just the pages are multiplying quite fast now so want to be able to edit them all at once rather than go through each one individually. Code pasted below, many thanks!! Stain <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/template.dwt" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <!-- InstanceBeginEditable name="doctitle" --> <title>Day Cruises - The Friendship Rose Caribbean Schooner - Day Tours, Private Charters, Weddings, Events - Bequia, Saint Vincent and the Grenadines</title> <!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="meta" --> <meta name="Keywords" content="Friendship Rose, Caribbean, Schooner, Bequia, St. Vincent, Grenadines, Day Tours, Weddings, Events, Private Charters, Mustique, Tobago Cays, Tobago, Mayreau, Sail, Sailing, Ship, Boat, Day Cruises" /> <meta name="Description" content="Day Cruises - The Friendship Rose Caribbean Schooner - Offering Day Tours, Private Charters, Weddings and Events throughout Bequia, Saint Vincent and the Grenadines. Sail for the day in Classic Island Style... " /> <!-- InstanceEndEditable --> <script type="text/javascript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> <!-- Google Tracking --> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-5795962-3']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <!-- InstanceBeginEditable name="head" --> <!-- InstanceEndEditable --> <link href="tester.css" rel="stylesheet" type="text/css" /> </head> <body onload="MM_preloadImages('Images/RoselinkRoll.jpg','Images/GIVRoll.jpg','Images/RealRoll.jpg','Images/WeddingsRoll.jpg','Images/SRERoll.jpg')"> <div id="ContainerMain"> <a href="http://www.friendshiprose.com" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('FR','','Images/RoselinkRoll.jpg',1)"><img src="Images/Roselink.jpg" alt="Friendship Rose Caribbean Schooner" name="FR" width="160" height="97" border="0" class="TopNav" /></a> <a href="http://www.grenadinevillas.com" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('GIV','','Images/GIVRoll.jpg',1)"><img src="Images/GIV.jpg" alt="Grenadine Island Villa Rentals" name="GIV" width="160" height="97" border="0" class="TopNav" /></a> <a href="http://www.grenadineproperty.com" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('RE','','Images/RealRoll.jpg',1)"><img src="Images/Real.jpg" alt="Grenadines Land & Villa Sales" name="RE" width="160" height="97" border="0" class="TopNav" /></a> <a href="http://www.grenadineweddings.com" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('WED','','Images/WeddingsRoll.jpg',1)"><img src="Images/Weddings.jpg" alt="Grenadines Weddings & Events" name="WED" width="160" height="97" border="0" class="TopNav" /></a> <a href="http://www.sailrelaxexplore.com" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('SRE','','Images/SRERoll.jpg',1)"><img src="Images/SRE.jpg" alt="Sail Relax Explore the Grenadines" name="SRE" width="160" height="97" border="0" class="TopNav" /></a> <img src="Images/collection_large.jpg" width="160" height="30" alt="Grenadines Collection" id="Collection"/> <img src="Images/Friendship_Rose_Header.jpg" width="880" height="175" alt="Friendship Rose Caribbean Schooner" id="Header" /> <div id="LeftNav"> <a href="http://www.friendshiprose.com/contact.html"><img src="/Images/Day_Cruises.jpg" width="160" height="143" alt="Contact Us" id="Contact"/></a> <p> </p> <p> <a href="http://www.friendshiprose.com/cruises.html">Cruises</a></p> <p> <a href="http://www.friendshiprose.com/experience.html">The Experience</a></p> <p> <a href="http://www.friendshiprose.com/menu.html">Menu</a></p> <p> <a href="http://www.friendshiprose.com/locations.html">Locations</a></p> <p> <a href="http://www.friendshiprose.com/private_cruises.html">Private Cruises</a></p> <p> <a href="http://www.friendshiprose.com/weddings.html">Weddings</a></p> <p> <a href="http://www.friendshiprose.com/gallery.html">Image Gallery</a></p> <p> <a href="http://www.friendshiprose.com/sailing_calendar.html">Sailing Calendar</a></p> <p> <a href="http://www.friendshiprose.com/guestbook.html">Guestbook</a></p> <p> <a href="http://www.friendshiprose.com/contact.html">Contact Us</a></p> </div> <div id="maincontent"><!-- InstanceBeginEditable name="Main Content" --><!-- InstanceEndEditable --> </div> <div id="bottomcon"> <div id="Mail_FB"> <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.friendshiprose.com&layout=button_count&show_faces=false&width=160&action=like&font=verdana&colorscheme=light&height=46" scrolling="no" frameborder="0" style="border:#999" overflow:hidden; width:160px; height:46px;" allowTransparency="true"></iframe> <img src="Images/Mailing_List2.jpg" width="160" height="46" alt="Twitter Follow" id="fb_like" /> </div> <div id="SocialButtons"> <a href="http://www.facebook.com/home.php?ref=home#/group.php?gid=183257088849&ref=ts"><img src="Images/join_our_facebook_group.jpg" width="160" height="46" style="border:0" alt="Facebook Group"/></a> <img src="Images/twitter_logo.jpg" width="160" height="46" alt="Twitter Follow" id="Twit" /> </div> <img src="Images/Footer1.jpg" width="160" height="97" alt="Friendship Rose Rigging" class="FooterImgs"/> <img src="Images/Footer2.jpg" width="160" height="97" alt="Friendship Rose Hammock" class="FooterImgs"/> <img src="Images/Footer3.jpg" width="160" height="97" alt="Friendship Rose Helm" class="FooterImgs"/> <img src="Images/Footer4.jpg" width="160" height="97" alt="Friendship Rose Meal" class="FooterImgs"/> <div id="ContainerBot" align="left"> <h1 class="H1Text">The Friendship Rose Caribbean Schooner </h1> <h2 class="H2TextGap">Day Tours & Private Charters Through the Grenadines</h2> <h3 class="StandTextGap">Bequia, St. Vincent & the Grenadines, West Indies</h3> <p class="StandText">E-mail:<a href="mailto:friendshiprose@mac.com">friendshiprose@mac.com </a> </p> <p class="StandText">Tel BEQUIA: +1 (784) 495 0886/9 +1 (784) 457 3888 +1 (784) 457 3739 UK FREEPHONE 0800 0484814 </p> </div> </div> </div> </body> <!-- InstanceEnd --></html>
  5. And now I'm getting an error code?! I'm not changing stuff, just simply refreshing every so often! Fatal error: Call to undefined function mysql_connect() in C:\Inetpub\sites\friendshiprose\tester1.php on line 9 Sounds fatal... I've only heard bad things about iPower, confounded by the uselessness of their support (they would simply say something was fine on their side - blaming my cookies, even though using facebook, people around the world would get exactly the same results) Anybody got recommendations on webhosts?
  6. What a surprise... Not working now, haven't touched it since it was working...
  7. I should add; never with PHP involved and never with a complete blank page...
  8. Ahh yeah, I managed to resort back to my old crappy code. I tried it with your code but with no joy - no error code this time either... I fiddled around a couple of times to try and make it fit with the new iPower way (trial and error trial and error!) but no joy. this was the last one I tried: <?php ini_set('display_errors',1); error_reporting(E_ALL); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="robots" content="noindex" /> <title>Guest Information</title> </head> <body> <?php $username = "******"; $password = "******"; $host = "******.ipowermysql.com"; $database = "guest_info" $rose_connect = mysql_connect($******.ipowermysql.com,$name,$password); or die ('I dunno...' .mysql_error()); mysql_select_db ($rose_guest_list,$rose_connect) or die('Unable to select DB.'); //build query $query = mysql_query ('SELECT * FROM guest_info') or die('Idunno 2...' .mysql_error()); //display results while ($row = mysql_fetch_array($query)) { echo '<br/> Cruise: '.$row['Cruise']. '<br/> Date: '.$row['Date']. '<br/> Adults: '.$row['No_Adults']. '<br/> Kids: '.$row['No_Kids']. '<br/> Name: '.$row['Name']. '<br/> Email: '.$row['Email']. '<br/> Phone: '.$row['Phone']. '<br/> Staying: '.$row['Staying']. '<br/> Payment: '.$row['Payment']. '<br/> Info: '.$row['info']. '<br/>;} ?> </body> </html> What the...?!?! I just typed in the tester URL I did with your code in randomly, (the one from earlier on - not the code pasted above), and it is now working?! I've had issues with iPower randomly showing pages, then the next day not, the same with images (really common)... Do I trust that this is sorted?! Any ideas why it would do this?! Thanks for all of your help
  9. Arghhhh!! So after PFMaBiSmAd brilliantly found some iPower instructions (I should have found them right, but I have no faith in iPower...) , you would have thought it would all be sorted... Nope, still the same issue - have fiddled around with the code (' and " and $) and the code location, but still no joy - same completely blank page This is exactly how iPower say to write it: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="robots" content="noindex" /> <title>Untitled Document</title> </head> <body> <?php $username = "******"; $password = "******"; $host = "******.ipowermysql.com"; $database = "guest_info" $rose_connect = mysql_connect($******.ipowermysql.com,$name,$password); or die ('I dunno...' .mysql_error()); mysql_select_db($rose_guest_list,$rose_connect); //build query $query = mysql_query ('SELECT * FROM guest_info'); //display results while ($row = mysql_fetch_array($query)) { echo '<br/> Cruise: '.$row['Cruise']. '<br/> Date: '.$row['Date']. '<br/> Adults: '.$row['No_Adults']. '<br/> Kids: '.$row['No_Kids']. '<br/> Name: '.$row['Name']. '<br/> Email: '.$row['Email']. '<br/> Phone: '.$row['Phone']. '<br/> Staying: '.$row['Staying']. '<br/> Payment: '.$row['Payment']. '<br/> Info: '.$row['info']. '<br/>;} ?> </body> </html>
  10. Sorry Pikachu all I can find is this: sql.safe_mode - local: off master: off Is it safe for me to post the URL? thanks
  11. Thanks again guys for this help, much appreciated. Ok so I didn't place the error code in it's own separate php code in front of the html head... but have done now and still no error code from my code. PFMaBiSmAd - in the iPower file manager you can edit the code for each page, there doesn't seem to be an issue with empty files? However I copied Pikachu2000's code into a new page and got the following error code!!: Fatal error: Call to undefined function mysql_connect() in C:\Inetpub\sites\friendshiprose\tester2.php on line 17 Getting there!!
  12. Ok thanks mgallforever, So iPower support should be able to sort me out?! Ha... they're rubbish, but I'll give it a go! Weird thing is iPower MySQL Beta, where my database is, can create code: <?php $link = mysql_connect('******.ipowermysql.com', '******', '******'); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; mysql_select_db(rose_guest_list); ?> When I created a test page with this code I'm sure (terrible memory) it worked at first. Now it doesn't work as the full URL, but if i preview it from iPower it works....?! Also, when using the URL the page is blank but... viewing the source code it shows all the spiel at the top: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> </head> <body> Like I say I'm a real beginner, but this is weird right...?! I've had numerous problems with iPower before, could it be them?
  13. Ahhh ok yeah, sorry. Nope it is completely blank, no html code either - no <!DOCTYPE... etc etc just white. It is the same if I type the URL in a browser (Firefox, IE & Safari ) or if on the iPower file manager I preview the page... both give me nothing.
  14. Mgallforever, Yeah sorry, I have made amendments to the PHP section as suggested to view any error codes, and have simply shown that in that last section of code I posted. The HTML elements are all there, see my first post to view the complete code (minus the amendments obviously )
  15. the first few lines of code now look like: <?php ini_set('display_errors',1); error_reporting(E_ALL); mysql_connect ('******.ipowermysql.com', '******', '******') or die ('I dunno...' .mysql_error()); mysql_select_db(rose_guest_list); But still no joy, still shows a blank page with no source code to view How frustrating...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.