Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Cranavvo badgshop dosen't load quiet right..
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Sniz" data-source="post: 115971" data-attributes="member: 18721"><p>Im getting this error.</p><p>[CODE]</p><p>Notice: Undefined index: error in C:\xampp\htdocs\badgeshop\assets\errors.php on line 3</p><p> </p><p>Notice: Undefined index: addcode in C:\xampp\htdocs\badgeshop\assets\adpro.php on line 13</p><p> </p><p>Notice: Undefined index: addprice in C:\xampp\htdocs\badgeshop\assets\adpro.php on line 14</p><p> </p><p>Notice: Undefined index: addname in C:\xampp\htdocs\badgeshop\assets\adpro.php on line 15</p><p> </p><p>Notice: Undefined index: addsubmit in C:\xampp\htdocs\badgeshop\assets\adpro.php on line 16</p><p> </p><p>Notice: Undefined index: badgecode in C:\xampp\htdocs\badgeshop\assets\adpro.php on line 18</p><p> </p><p>Notice: Undefined index: remsubmit in C:\xampp\htdocs\badgeshop\assets\adpro.php on line 19[/CODE]</p><p> </p><p>Here is my adpro.php and errors.php.</p><p> </p><p><strong>Adpro.php</strong></p><p>[PHP]<?PHP</p><p>// ADPRO :o means admin process, cba doing seperate files</p><p>// meh :) ME GUSTA</p><p> </p><p>//add and remove</p><p> </p><p>if($rank<5){</p><p> </p><p> </p><p> </p><p>}</p><p>else</p><p>$a_badgecode = mysql_real_escape_string(strtoupper($_POST['addcode']));</p><p>$a_price = mysql_real_escape_string($_POST['addprice']);</p><p>$a_name = mysql_real_escape_string($_POST['addname']);</p><p>$a_submit = mysql_real_escape_string($_POST['addsubmit']);</p><p> </p><p>$r_badgecode = mysql_real_escape_string(strtoupper($_POST['badgecode']));</p><p>$r_submit = mysql_real_escape_string($_POST['remsubmit']);</p><p> </p><p>// REMOVE</p><p> </p><p>if($r_submit){</p><p>$r = mysql_query("SELECT * FROM badgeshop WHERE badgecode='{$r_badgecode}'");</p><p>$exist = mysql_num_rows($r);</p><p> </p><p>if($r_badgecode){</p><p> </p><p>if($exist!=0){</p><p> </p><p> $done = mysql_query("DELETE FROM badgeshop WHERE badgecode='{$r_badgecode}'");</p><p> if($done){</p><p> </p><p> header("Location: index.php?error=15");</p><p> mysql_close($server);</p><p> die();</p><p> </p><p> }</p><p> else</p><p> header("Location: index.php?error=2");</p><p> mysql_close($server);</p><p> die();</p><p> </p><p>}</p><p>else</p><p>header("Location: index.php?error=1");</p><p>mysql_close($server);</p><p>die();</p><p> </p><p>}</p><p>else</p><p>header("Location: index.php?error=6");</p><p>mysql_close($server);</p><p>die();</p><p> </p><p>}</p><p> </p><p> </p><p> </p><p>// ADD</p><p> </p><p>if($a_submit){</p><p> </p><p>$a = mysql_query("SELECT * FROM badgeshop WHERE badgecode='{$badgecode}'");</p><p> </p><p> </p><p>if($a_name&&$a_price&&$a_badgecode){</p><p> </p><p>if(strlen($a_name)>25){ header("Location: index.php?error=7"); mysql_close($server); die(); }</p><p>else</p><p>if(strlen($a_price)>9){ header("Location: index.php?error=8"); mysql_close($server); die(); }</p><p>else</p><p>$exist = mysql_num_rows($a);</p><p>if($exist!=1){</p><p> </p><p>$addbadge = mysql_query("INSERT INTO badgeshop(id, badgecode, price, badgename) VALUES(NULL , '{$a_badgecode}', '{$a_price}', '{$a_name}')");</p><p> </p><p>if($addbadge){</p><p> </p><p>header("Location: index.php?error=11");</p><p>mysql_close($server);</p><p>die();</p><p> </p><p>}</p><p>else</p><p>header("Location: index.php?error=2");</p><p>mysql_close($server);</p><p>die();</p><p> </p><p> </p><p>}</p><p>else</p><p>header("Location: index.php?error=9");</p><p>mysql_close($server);</p><p>die();</p><p> </p><p>}</p><p>else</p><p>header("Location: index.php?error=6");</p><p>mysql_close($server);</p><p>die();</p><p> </p><p>}</p><p> </p><p>?>[/PHP]</p><p><strong>Errors.php </strong></p><p>[PHP]<?PHP</p><p> </p><p>$error = mysql_real_escape_string($_GET['error']);</p><p> </p><p>// *ERRORS*</p><p>//1 Badge doesn't exist, which is odd this error will only appear if the user attempts to type it in the url thing blahblahblah</p><p>//2 a query failed, oh the joy!</p><p>//3 bro, get some credits....</p><p>// *SUCCESS*</p><p>//1 Operational successfully :)</p><p> </p><p>if($error==1){</p><p> </p><p>echo "<div id='alert'>The badge doesn't exist!</div>";</p><p> </p><p>}</p><p> </p><p>if($error==2){</p><p> </p><p>echo "<div id='error'>The operation was not successfull. Please contact a system administrator.</div>";</p><p> </p><p>}</p><p> </p><p>if($error==3){</p><p> </p><p>echo "<div id='alert'>It appears you have insufficient funds!</div>";</p><p> </p><p> </p><p>}</p><p> </p><p>if($error==4){</p><p> </p><p>echo "<div id='error'>You already have that badge!</div>";</p><p> </p><p> </p><p>}</p><p> </p><p>if($error==5){</p><p> </p><p>echo "<div id='success'>You've successfully bought the badge!</div>";</p><p> </p><p>}</p><p> </p><p>if($error==6){</p><p> </p><p>echo "<div id='alert'>You didn't enter <b>ALL</b> fields!</div>";</p><p> </p><p> </p><p>}</p><p> </p><p>if($error==7){</p><p> </p><p>echo "<div id='alert'>The name is too big!</div>";</p><p> </p><p> </p><p>}</p><p>if($error==8){</p><p> </p><p>echo "<div id='alert'>Cranavvo says <b>NO</b> to the 9 digit number!</div>";</p><p> </p><p> </p><p>}</p><p>if($error==9){</p><p> </p><p>echo "<div id='alert'>The badge is already on sale!</div>";</p><p> </p><p> </p><p>}</p><p>if($error==10){</p><p> </p><p>echo "<div id='alert'>It appears you already have that badge!</div>";</p><p> </p><p> </p><p>}</p><p>if($error==11){</p><p> </p><p>echo "<div id='success'>You've successfully added the badge!</div>";</p><p> </p><p> </p><p>}</p><p>if($error==12){</p><p> </p><p>echo "<div id='success'>The request was successfully sent!</div>";</p><p> </p><p> </p><p>}</p><p>if($error==13){</p><p> </p><p>echo "<div id='alert'>The badgecode is too big!</div>";</p><p> </p><p> </p><p>}</p><p>if($error==14){</p><p> </p><p>echo "<div id='alert'>The badge requests have reached its limit and your request was not sent!</div>";</p><p> </p><p> </p><p>}</p><p>if($error==15){</p><p> </p><p>echo "<div id='success'>The badge has been successfully removed!</div>";</p><p> </p><p> </p><p>}</p><p> </p><p>?>[/PHP]</p><p> </p><p>I saw some other thread about this but it didn't look like it was solved..</p><p> </p><p>And if anybody could help me with my news system too it would be amazing.</p><p>How do i remove the {newsTitle} thing, and how do i get the news box in the right side of the layout just besides the scroll bar?</p><p><a href="http://awesomescreenshot.com/07b96nl5d" target="_blank">http://awesomescreenshot.com/07b96nl5d</a></p></blockquote><p></p>
[QUOTE="Sniz, post: 115971, member: 18721"] Im getting this error. [CODE] Notice: Undefined index: error in C:\xampp\htdocs\badgeshop\assets\errors.php on line 3 Notice: Undefined index: addcode in C:\xampp\htdocs\badgeshop\assets\adpro.php on line 13 Notice: Undefined index: addprice in C:\xampp\htdocs\badgeshop\assets\adpro.php on line 14 Notice: Undefined index: addname in C:\xampp\htdocs\badgeshop\assets\adpro.php on line 15 Notice: Undefined index: addsubmit in C:\xampp\htdocs\badgeshop\assets\adpro.php on line 16 Notice: Undefined index: badgecode in C:\xampp\htdocs\badgeshop\assets\adpro.php on line 18 Notice: Undefined index: remsubmit in C:\xampp\htdocs\badgeshop\assets\adpro.php on line 19[/CODE] Here is my adpro.php and errors.php. [B]Adpro.php[/B] [PHP]<?PHP // ADPRO :o means admin process, cba doing seperate files // meh :) ME GUSTA //add and remove if($rank<5){ } else $a_badgecode = mysql_real_escape_string(strtoupper($_POST['addcode'])); $a_price = mysql_real_escape_string($_POST['addprice']); $a_name = mysql_real_escape_string($_POST['addname']); $a_submit = mysql_real_escape_string($_POST['addsubmit']); $r_badgecode = mysql_real_escape_string(strtoupper($_POST['badgecode'])); $r_submit = mysql_real_escape_string($_POST['remsubmit']); // REMOVE if($r_submit){ $r = mysql_query("SELECT * FROM badgeshop WHERE badgecode='{$r_badgecode}'"); $exist = mysql_num_rows($r); if($r_badgecode){ if($exist!=0){ $done = mysql_query("DELETE FROM badgeshop WHERE badgecode='{$r_badgecode}'"); if($done){ header("Location: index.php?error=15"); mysql_close($server); die(); } else header("Location: index.php?error=2"); mysql_close($server); die(); } else header("Location: index.php?error=1"); mysql_close($server); die(); } else header("Location: index.php?error=6"); mysql_close($server); die(); } // ADD if($a_submit){ $a = mysql_query("SELECT * FROM badgeshop WHERE badgecode='{$badgecode}'"); if($a_name&&$a_price&&$a_badgecode){ if(strlen($a_name)>25){ header("Location: index.php?error=7"); mysql_close($server); die(); } else if(strlen($a_price)>9){ header("Location: index.php?error=8"); mysql_close($server); die(); } else $exist = mysql_num_rows($a); if($exist!=1){ $addbadge = mysql_query("INSERT INTO badgeshop(id, badgecode, price, badgename) VALUES(NULL , '{$a_badgecode}', '{$a_price}', '{$a_name}')"); if($addbadge){ header("Location: index.php?error=11"); mysql_close($server); die(); } else header("Location: index.php?error=2"); mysql_close($server); die(); } else header("Location: index.php?error=9"); mysql_close($server); die(); } else header("Location: index.php?error=6"); mysql_close($server); die(); } ?>[/PHP] [B]Errors.php [/B] [PHP]<?PHP $error = mysql_real_escape_string($_GET['error']); // *ERRORS* //1 Badge doesn't exist, which is odd this error will only appear if the user attempts to type it in the url thing blahblahblah //2 a query failed, oh the joy! //3 bro, get some credits.... // *SUCCESS* //1 Operational successfully :) if($error==1){ echo "<div id='alert'>The badge doesn't exist!</div>"; } if($error==2){ echo "<div id='error'>The operation was not successfull. Please contact a system administrator.</div>"; } if($error==3){ echo "<div id='alert'>It appears you have insufficient funds!</div>"; } if($error==4){ echo "<div id='error'>You already have that badge!</div>"; } if($error==5){ echo "<div id='success'>You've successfully bought the badge!</div>"; } if($error==6){ echo "<div id='alert'>You didn't enter <b>ALL</b> fields!</div>"; } if($error==7){ echo "<div id='alert'>The name is too big!</div>"; } if($error==8){ echo "<div id='alert'>Cranavvo says <b>NO</b> to the 9 digit number!</div>"; } if($error==9){ echo "<div id='alert'>The badge is already on sale!</div>"; } if($error==10){ echo "<div id='alert'>It appears you already have that badge!</div>"; } if($error==11){ echo "<div id='success'>You've successfully added the badge!</div>"; } if($error==12){ echo "<div id='success'>The request was successfully sent!</div>"; } if($error==13){ echo "<div id='alert'>The badgecode is too big!</div>"; } if($error==14){ echo "<div id='alert'>The badge requests have reached its limit and your request was not sent!</div>"; } if($error==15){ echo "<div id='success'>The badge has been successfully removed!</div>"; } ?>[/PHP] I saw some other thread about this but it didn't look like it was solved.. And if anybody could help me with my news system too it would be amazing. How do i remove the {newsTitle} thing, and how do i get the news box in the right side of the layout just besides the scroll bar? [URL]http://awesomescreenshot.com/07b96nl5d[/URL] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Cranavvo badgshop dosen't load quiet right..
Top