citydude Posted April 8, 2010 Share Posted April 8, 2010 Hello All, I'm not a programmer and need some help resolving a problem. I recently tried to edit one of the pages on my site by deleting a bunch of input fields on a form the should not have been there. I first saved the original page then edited the copy. Fired it up to the site and now only the home page header loads into the browser and I get this error message just below the header. SELECT id,head_text,main_text FROM pvw_ad where ad_status = '1' 1045 Access denied for user 'citygirl'@'localhost' (using password: NO) I have no idea what went wrong or what this error means, much the less how to fix the problem so the site will properly display the page again. Any help would be appreciated. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/197962-need-helpwhat-went-wrong/ Share on other sites More sharing options...
oni-kun Posted April 8, 2010 Share Posted April 8, 2010 Clearly you do not have the proper credentials to the said database. Why does it print the query? It would be of obvious help if you posted your actual code. Quote Link to comment https://forums.phpfreaks.com/topic/197962-need-helpwhat-went-wrong/#findComment-1038772 Share on other sites More sharing options...
Jax2 Posted April 8, 2010 Share Posted April 8, 2010 It means that for some reason, your code that set's the database, username, password and host is missing or no longer correct. ... you need to connect to the database before you can pull information out of it. Quote Link to comment https://forums.phpfreaks.com/topic/197962-need-helpwhat-went-wrong/#findComment-1038773 Share on other sites More sharing options...
citydude Posted April 8, 2010 Author Share Posted April 8, 2010 Thanks for the feedback and the info only wish I knew how to implement the solution! The code for the page that I sent up there is below. Its the original page with no editing. <?php include ("../authuser.php"); include ("session.php"); session_start(); if(isset($Submit)) { if( $_SESSION['security_code'] == $_POST['security_code'] && !empty($_SESSION['security_code']) ) { $sql="insert into writeadd set username='$username',cusername='$cusername',email='$email',cemail='$cemail',gender='$gender',preferred_age='$preferred_age',experience='$experience',ethnicity='$ethnicity',hair_color='$hair_color',eye_color='$eye_color',breast_size='$breast_size',cup_size='$cup_size',waist_size='$waist_size',hip_size='$hip_size',sexual_orien='$sexual_orien',public_hair='$public_hair',hair_male='$hair_male',cock_l='$cock_l',cock_g='$cock_g',type_shoot='$type_shoot',escort='$escort',shoot='$shoot',free_rewrite='$free_rewrite',image1='$image1',image2='$image2',image3='$image3',image4='$image4',make_up='$make_up'"; $db->insert($sql); echo "<script>alert('Thank you for submitting the information for your ad. One of our copyrighters will compose your ad and email you a proof within 24 hours for your consideration. Regards, Flaggoff.com');window.location='advertisements.php';</script>"; } else { // Insert your code for showing an error message here $error1="Sorry, you have provided an invalid security code"; } } $sdis="<img src='CaptchaSecurityImages.php?width=100&height=40&characters=5'>"; $pro=$_SESSION['security_code']; ?> <style type="text/css"> <!-- /*.style1 { font-family: Forte; font-size: 24px; color: #ef6abf; } .style5 { font-size: 26px; font-weight: bold; } .style7 {font-size: 16px} .style8 { color: #000000; font-size: 24px; font-weight: bold; } .style9 { color: #FF0000; font-size: 18px; font-weight: bold; }*/ --> </style> <!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=iso-8859-1" /> <title>Untitled Document</title> <title>Flaggoff</title> <link href="default.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .style1 { font-family: Forte; font-size: 24px; color: #ef6abf; } .style3 { font-size: 18px; color: #FF99CC; } .style4 {color: #FF0000} --> </style> <style type="text/css"> <!-- .style1 { font-family: Forte; font-size: 24px; color: #ef6abf; } .txt{ font-family: Arial, Helvetica, sans-serif; font-size:13px; color:#000000; line-height:14px; } .style5 { font-size: 26px; font-weight: bold; } .style7 {font-family: Forte; font-size: 22px; color: #ef6abf; } --> </style> </head> <script type="text/javascript"> function vali() { if(document.formname.radiotext.checked==false) { document.getElementById("counter2").innerHTML ="<p class='error'>Failed - please Accept the terms and condition for this sponsor page!...</p>"; document.formname.radiotext.focus(); return false; } } </script> <script type="text/javascript"> function validate1() { if(document.pro.sen.value=="") { document.getElementById("counter2").innerHTML ="<p class='error'>Cannot Submit: please complete the following field > Uniqueness</p>"; document.pro.sen.focus(); return false; } } function validate() { if(document.pro.username.value=="") { document.getElementById("counter2").innerHTML ="<p class='error'>Cannot Submit: please complete the following field > Username</p>"; document.pro.username.focus(); return false; } if(document.pro.cusername.value=="") { document.getElementById("counter2").innerHTML ="<p class='error'>Cannot Submit: please complete the following field > Confirm Username</p>"; document.pro.cusername.focus(); return false; } if(document.pro.username.value!=document.pro.cusername.value) { document.getElementById("counter2").innerHTML ="<p class='error'>Cannot Submit: Both usernames are not the same!</p>"; document.pro.cusername.focus(); return false; } if(document.pro.email.value=="") { document.getElementById("counter2").innerHTML ="<p class='error'>Cannot Submit: please complete the following field > Email</p>"; document.pro.email.focus(); return false; } if(document.pro.cemail.value=="") { document.getElementById("counter2").innerHTML ="<p class='error'>Cannot Submit: please complete the following field > Confirm Email</p>"; document.pro.cemail.focus(); return false; } if(document.pro.email.value!=document.pro.cemail.value) { document.getElementById("counter2").innerHTML ="<p class='error'>Cannot Submit: Both Emails are not same</p>"; document.pro.cemail.focus(); return false; } var str = document.pro.email.value; var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid if (!reg1.test(str) && reg2.test(str)) { return true; } else{ alert ("Please enter valid Email in the \"Email\" field."); document.pro.email.focus(); return false; } if(document.pro.security_code.value=="") { document.getElementById("counter2").innerHTML ="<p class='error'>Cannot Submit: please complete the following field > Security code</p>"; document.pro.security_code.focus(); return false; } } </script> <body> <div id="container"> <!--<div id="banner1"><br><br><br><font color="#FF0000">NO auto deletions, NO banned words, NO city limit, No stupid forums, And NO BULLSHIT<span>!</span></font><br /></div>--> <div id="banner5"><br><br><br> <span class="style10"> <span class="style9">No auto deletions, No banned words, No city limit, No stupid forums, No bullshit!</span></span><br></div> <ul class="solidblockmenu"> <li><a href="../index.php">Home</a></li> <li><a href="index1.php">Sponsored Ads</a></li> <li><a href="profile.php">Profile</a></li> <li><a href="listings.php">Your Free Ads</a></li> <li><a href="advertisements.php" class="current">Post An Ad</a></li> <li><a href="logout.php">Log-Out</a></li> </ul> <br /><br /> <br /> <form name="pro" action="writemyadd.php" method="post" enctype="multipart/form-data" onSubmit="return validate();"> <span class="style1" ><span class="style5">Write My Ad, Dude!</span></span></p> <p align="left">Please provide as much information as possible about the type of ad you require. The more specific you are the easier it will<br /> be for us to compose an ad that will closely target the audience you are looking to get replies from. Please make sure you<br /> include all the information that applies:<br /> <br /><table width="638" height="54"> <tr><td width="296"> <font color="#ef6abf" face="forte" size="2"><strong>My U/N is:</strong></font> </strong> <input type="text" name="username" /></td><td width="330"> </strong><font color="#ef6abf" face="forte" size="2"><strong>Confirm U/N:</strong></font> </strong> <input type="text" name="cusername" /></td></tr> <tr><td><strong> <font color="#ef6abf" face="forte" size="2">My Email is: </font></strong> <input type="text" name="email" /></tD><td> <strong > <font color="#ef6abf" face="forte" size="2">Confirm email:</font> </strong> <input type="text" name="cemail" /></td></tr> </table> <table width="691" > <tr><td colspan="12"><strong class="style1">I'm looking for: </strong></td></tr> <tr><td width="129" height="47" class="txt"> Gender</td><td width="4" class="txt">:</td><td width="189" class="txt"> <select name="gender"> <option value="select" selected>Select</option> <option value="Female" >Female</option> <option value="Male">Male</option> <option value="Transsexual Male">Transsexual Male</option> <option value="Transsexual Female">Transsexual Female</option> </select></td> <td class="txt" width="135"> Preferred age</td><td width="11" class="txt">:</td><td width="281" class="txt"> <select name="preferred_age"> <option value="select" selected>Select</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31-40">31 - 40</option> <option value="41-50">41 - 50</option> <option value="51+">51+</option> </select></td></tr> <tr><td class="txt" height="46">Experience</td><td class="txt">:</td><td class="txt"> <select name="experience"> <option value="select" selected>Select</option> <option value="None - FT (First Time Model)">None - FT (First Time Model)</option> <option value="Amateur">Amateur</option> <option value="Some experience">Some experience</option> <option value="Semi pro">Semi pro</option> <option value="Professional">Professional</option> </select></td><td class="txt"> Ethnicity</td><td class="txt">:</td><td class="txt"> <select name="ethnicity"> <option value="select" selected>Select</option> <option value="Caucasian">Caucasian</option> <option value="Black">Black</option> <option value="Hispanic">Hispanic</option> <option value="Asian">Asian</option> <option value="Oriental">Oriental</option> <option value="Native Indian">Native Indian</option> <option value="East Indian">East Indian</option> <option value="European">European</option> <option value="Scandinavian">Scandinavian</option> <option value="Aboriginal">Aboriginal</option> <option value="No preference">No preference</option> </select></td></tr> <p> <tr><td class="txt" height="37"> Hair color</td><td class="txt">:</td><td class="txt"> <select name="hair_color"> <option value="select" selected>Select</option> <option value="Blonde">Blonde</option> <option value="Dark Brown">Dark Brown</option> <option value="Black">Black</option> <option value="Platinum Blonde">Platinum Blonde</option> <option value="Gray">Gray</option> <option value="Auburn">Auburn</option> <option value="Light Brown">Light Brown</option> <option value="Strawberry Blonde">Strawberry Blonde</option> <option value="Red">Red</option> <option value="No preference">No preference</option> </select></td><td class="txt"> Eye Color</td><td class="txt">:</td><td class="txt"> <select name="eye_color"> <option value="select" selected>Select</option> <option value="Blue">Blue</option> <option value="Brown">Brown</option> <option value="Black">Black</option> <option value="Green">Green</option> <option value="Violet">Violet</option> <option value="Gray">Gray</option> <option value="Hazel">Hazel</option> <option value="No preference">No preference</option> </select></td></tr> <tr><td class="txt" height="34">Breast Size</td><td class="txt">:</td><td class="txt"> <select name="breast_size"> <option value="select" selected>Select</option> <option value="20 - 30 inches">20 - 30 inches</option> <option value="31 - 36 inches">31 - 36 inches</option> <option value="36 - 44 inches">36 - 44 inches</option> <option value="44+ inche">44+ inches</option> <option value="No preference">No preference</option> </select></td><td class="txt"> Cup Size</td><td class="txt">:</td><td class="txt"> <select name="cup_size"> <option value="select" selected>Select</option> <option value="AA">AA</option> <option value="A">A</option> <option value="B">B</option> <option value="C">C</option> <option value="D">D</option> <option value="E">E</option> <option value="F">F</option> <option value="G">G</option> <option value="DD">DD</option> <option value="No preference">No preference</option> </select></td></tr> <tr><td class="txt" height="47">Waist Size</td><td class="txt">:</td><td class="txt"> <select name="waist_size"> <option value="select" selected>Select</option> <option value="">18- 24 Inches</option> <option value="">25 - 28 Inches</option> <option value="">29 -34 Inches</option> <option value="">35 - 42 Inches</option> <option value="">43+ Inches</option> <option value="">Np preference</option> </select></td><td class="txt"> Hip Size</td><td class="txt">:</td><td class="txt"> <select name="hip_size"> <option value="select" selected>Select</option> <option value="20 - 24 Inches">20 - 24 Inches</option> <option value="25 - 34 Inches">25 - 34 Inches</option> <option value="35 - 38 inches">35 - 38 inches</option> <option value="38 - 42 Inches">38 - 42 Inches</option> <option value="42+ Inches">42+ Inches</option> <option value="No preference">No preference</option> </select></tD></tr> <tr><td class="txt" height="39">Sexual Orientation</td><td class="txt">:</td><td class="txt"> <select name="sexual_orien"> <option value="select" selected>Select</option> <option value="Heterosexual">Heterosexual</option> <option value="Homosexual">Homosexual</option> <option value="Bisexual">Bisexual</option> <option value="Lesbian">Lesbian</option> <option value="No preference">No preference</option> </select></td><td class="txt"> Pubic Hair</td><td class="txt">:</td><td class="txt"> <select name="public_hair"> <option value="select" selected>Select</option> <option value="None - Clean Shaven">None - Clean Shaven</option> <option value="Landing Strip">Landing Strip</option> <option value="Some Hair">Some Hair</option> <option value="Thick And Full">Thick And Full</option> <option value="Really Hairy">Really Hairy</option> <option value="Extremely Hairy">Extremely Hairy</option> </select> </td></tr> <tr><td class="txt" height="38"> Body Hair Male</td><td class="txt">:</td><td class="txt"> <select name="hair_male"> <option value="None">None</option> <option value="Small amount OK">Small amount OK</option> <option value="Hairy Chest OK">Hairy Chest OK</option> <option value="Really hairy OK">Really hairy OK</option> <option value="Extremely Hairy OK">Extremely Hairy OK</option> </select></td> <td class="txt">Cock L</td><td class="txt">:</td><td class="txt"> <select name="cock_l"> <option value="select" selected>Select</option> <option value="3 -6 Inches">3 -6 Inches</option> <option value="7 -10 Inches">7 -10 Inches</option> <option value="10-12 Inches">10-12 Inches</option> <option value="12+ Inches">12+ Inches</option> <option value="No Preference">No Preference</option> </select> </tD></tr> <tr><td class="txt" height="60"> Cock G</td><td class="txt">:</td><td class="txt"> <select name="cock_g"> <option value="select" selected>Select</option> <option value="Average Thickness">Average Thickness</option> <option value="Medium Thickness">Medium Thickness</option> <option value="Really Thick">Really Thick</option> <option value="Extremely Thick">Extremely Thick</option> <option value="Monster Cock ">Monster Cock </option> <option value="No preference">No preference</option> </select></td><td class="txt"> Type of Shoot</td><td class="txt">:</td><td class="txt"> <select name="type_shoot"> <option value="select" selected>Select</option> <option value="Artistic">Artistic</option> <option value="Glamour">Glamour</option> <option value="Semi Nude - Topless">Semi Nude - Topless</option> <option value="Totally Nude - No Spreads">Totally Nude - No Spreads</option> <option value="Explicit Nude - Full Spreads">Explicit Nude - Full Spreads</option> <option value="Explicit Nude - Pussy spreads">Explicit Nude - Pussy spreads</option> <option value="Hardcore Solo">Hardcore Solo</option> <option value="Hardcore b/g">Hardcore b/g</option> <option value="Hardcore g/g">Hardcore g/g</option> <option value="Hardcore g/bang">Hardcore g/bang</option> <option value="Hardcore Fetish">Hardcore Fetish</option> <option value="Interracial">Interracial</option> </select></tD></tr> <tr><td class="txt" colspan="1">Model May Have An Escort</td><td class="txt">:</td><td class="txt"> <select name="escort"> <option value="select" selected>Select</option> <option value="Yes - Female only">Yes - Female only</option> <option value="Yes - Anyone">Yes - Anyone</option> <option value="Yes - NO close relations">Yes - NO close relations</option> <option value="Yes - NOT romantically involved">Yes - NOT romantically involved </option> <option value="No">No </option> </select></tD><td class="txt"> Shoot is</td><td class="txt">:</td><td class="txt"> <select name="shoot"> <option value="select" selected>Select</option> <option value="One Time">One Time</option> <option value="Recurring">Recurring</option> </select></td></tr><tr><td class="txt"> </td></tr></table> <table width="80%"> <tr><tD class="txt">• Rate of pay..</tD></tr> <tr><tD class="txt"> • Method of payment.</tD></tr> <tr><tD class="txt">• Location (Country, State, City).</tD></tr> <tr><tD class="txt">• Location (Interior, exterior, studio, hotel, etc). </tD></tr> <tr><tD class="txt">• Date of shoot. (specific date or on going) </tD></tr> <tr><tD class="txt">• Approximate length of shoot.</tD></tr> <tr><tD class="txt">• Hair and make up requirements.</tD></tr> <tr><tD class="txt" >• Wardrobe requirements.</tD></tr> <tr><tD class="txt">• Any special skills required</tD></tr> <tr><tD class="txt">• Any special considerations.</tD></tr> <tr><td class="txt" colspan="12"><br /> Once we receive the form and all the necessary information we will compose your ad and email it to<br /> you for approval.Please also attach any images you wish to post with your ad. One free re-write is included. </td></tr> <tr><td class="txt" colspan="12"><textarea name="free_rewrite" cols="50" rows="5"></textarea></td></tr> <tr><td class="txt"><h3><font color="#ef6abf" face="forte" size="+1"><br />Upload your photographs here:</font></h3></td></tr> <tr><td class="txt" > <input type="file" name="file" /></td></tr> <tr><td class="txt" > <input type="file" name="file2" /></td></tr> <tr><td class="txt" > <input type="file" name="file3" /></td></tr> <tr><td class="txt" > <input type="file" name="file4" /><br /><br /></td></tr> <tr><td class="txt"><B>Security Code : </B><input id="security_code" name="security_code" type="text" size="16" /> </td></tr> <tr><td align="center" colspan="12" class="txt"><font color='red'><?php echo $error1; ?></font></td></tr> <tr><td style="padding-left:100px"><?php echo $sdis; ?></td></tr> <tr><td class="txt" align="left" style="padding-left:100px"> <input type="submit" name="Submit" value="Submit" /></td></tr> <tr><td class="txt" colspan="12"> <div id="status"> <p class="title1" colspan="12"><font color="#FF0000">Status:</font></p> </div></td></tr> <tr><td colspan="12"><div id="counter2"></div></td></tr> <tr><tD colspan="12"><div id="bshadow"></div></tD></tr> </form> </td></tr></table> Hopefully this will help to find where the problem is. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/197962-need-helpwhat-went-wrong/#findComment-1038786 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.