Jump to content

Butler

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Butler's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Butler

    Help

    I tried inserting a banner and messed it up. What do i got to get rid of here to delete. My mom tried to do it with dream weaver. <?php if(stristr($_SERVER['SERVER_SOFTWARE'],'microsoft')){ error_reporting("E_ALL"); } include ('library/session_save_path.php'); session_start(); if (empty($HTTP_COOKIE_VARS[cart_items_num])) $num = 1; $num = $HTTP_COOKIE_VARS[cart_items_num] + 1; if ($_GET[addcart] == 1) { setcookie("cart_items[$num]", "$_GET[itemid]"); setcookie("cart_items_num", $num); $jsrefresh = '?page=cart'; include 'include/jsrefresh.php'; } if ($_GET[delete] == 1) { $cookie = $_GET[cookie]; setcookie("cart_items[$cookie]", "", time() - 3600); $jsrefresh = '?page=cart'; include 'include/jsrefresh.php'; } //--------------------- include 'library/fiprotect.php'; $filter = "$_GET "; if(stristr($filter, '/') === FALSE) { } else { die(); } //--------------------- include 'include/mysql.php'; include 'include/global.php'; include 'library/category_header.php'; include 'library/mr.php'; if (empty($rowxxx[LANGUAGE])) $rowxxx[LANGUAGE] = english; include "lang/$rowxxx[LANGUAGE].php"; $shownav = Yes; if ($_GET == detail) $shownav = No; //--------------------------- $cart_items_count = '0'; if (isset($HTTP_COOKIE_VARS[cart_items])) { foreach ($HTTP_COOKIE_VARS[cart_items] as $name => $value) { $cart_items_count = $cart_items_count + 1; } } //--------------------------- include "library/price.php"; //---------------------------- $header = $rowxxx[sITENAME3]; if ($_GET == detail) { $SQL = "SELECT * from PRODUCTS WHERE ID = '$_GET[get_id]'"; $result = @mysql_query( $SQL ); $row = @mysql_fetch_array( $result ); $rowxxx[sITENAME3] = "$rowxxx[sITENAME3] :: $row[TITLE]"; $SQL = "SELECT * from CATEGORIES WHERE ID = '$_GET[category]'"; $result = @mysql_query( $SQL ); $row = @mysql_fetch_array( $result ); $rowxxx[sITENAME3] = "$rowxxx[sITENAME3] :: $row[TITLE]"; } if ($_GET == browse) { $SQL = "SELECT * from CATEGORIES WHERE ID = '$_GET[category]'"; $result = @mysql_query( $SQL ); $row = @mysql_fetch_array( $result ); $rowxxx[sITENAME3] = "$rowxxx[sITENAME3] :: $row[TITLE] :: $rowxxx[sITENAMEB]"; } ?> <html> <head> <title> <?php echo $rowxxx[sITENAME3]; ?> </title> <link href="stylesheet2.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="lightbox.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <BODY bgcolor="#FFFFFF" text="#000000"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <form action="index.php?page=browse&mode=search" method="post" name="form1" id="form1" style="display: inline; margin: 0;"> <tr> <td class="padder5" nowrap><span class="bigtitle"><a href="index.php"> <?php echo $header; ?> </a></span></td> <td width="100%"> <div align="right"><span class="white_link"><img src="images/user-login-blue.gif" width="14" height="14"> <?PHP if ($_SESSION[username] != $nil) { ?> <?php echo $s_index7; ?> <?php echo $_SESSION[username]; ?> ( <a href="download.php?logout=1"> <?php echo $s_index8; ?> </a> ) <?php if ($rowi[sTATUS] != '2') { ?> ( <a href="download.php"> <?php echo $s_index9; ?> </a> ) <?PHP }} else { ?> <?php echo $s_index10; ?> ( <a href="download.php"> <?php echo $s_index11; ?> </a> ) ( <a href="index.php?page=register"> <?php echo $s_index12; ?> </a> ) <?PHP } ?> </span></div> </td> <td valign="top"><img src="images/transparent.gif" width="5" height="10"></td> <td nowrap> <input name="SEARCH" type="text" size="20" /> <input type="submit" name="Submit" value="<?php echo $s_index2; ?>" /> </td> </tr> </form> </table> <table width="100%" border=0 cellpadding=2 cellspacing=0 height="90"> <tr> <td class="space" valign=top > <table border="0" cellspacing="0" cellpadding="0" width="100%" align="CENTER"> <tr> <td><img src="images/bx_1.gif" width="14" height="15"></td> <td background="images/bx_top.jpg"></td> <td><img src="images/bx_2.gif" width="14" height="15"></td> </tr> <tr> <td background="images/bx_left.jpg"></td> <td width="100%" bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="colorclass1"><img src="images/nw.gif" width="10" height="10" /></td> <td class="colorclass1"></td> <td class="colorclass1"><img src="images/ne.gif" width="10" height="10" /></td> </tr> <tr> <td class="colorclass1"> </td> <td class="colorclass1" width="100%"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td ><img src="images/checkout3-orange.gif" width="14" height="14"></td> <td class="padder5" width="100%"><a href="index.php?page=cart"><b> <?php echo $s_index1; ?> </b></a> <?php if (empty($cart_items_count)) echo '( <b>0</b> )'; else echo "( <B>$cart_items_count</b> )";?> </td> </tr> </table> </td> <td class="colorclass1"> </td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="padder5u"><img src="images/transparent.gif" width="20" height="5" /></td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="colorclass2"> </td> <td class="colorclass2" width="100%"> <img src="images/transparent.gif" width="10" height="5"> <table width="100%" cellpadding="0" cellspacing="0" border="0" > <tr> <td class="padder5" nowrap > <?php echo $s_index3; ?> : <b> <?PHP if (isset($HTTP_COOKIE_VARS[cart_items])) { price ($value,$HTTP_COOKIE_VARS[cart_items],$csymbol); } else { ?> </b> <b> <?php echo $s_index4; ?> </b> <?PHP } ?> <?PHP if ($HTTP_COOKIE_VARS[cart_items] != $nil) { ?> </td> </tr> <tr> <td class="padder5" nowrap ><img src="images/visa.gif" width="14" height="14"> <a href="order.php?store=1"> <?php echo $s_index5; ?> </a> </td> </tr> <?PHP } ?> </table> </td> <td class="colorclass2"> </td> </tr> <tr> <td height="10"><img src="images/sw2.gif" width="10" height="10" /></td> <td class="colorclass2" height="10"></td> <td height="10"><img src="images/se2.gif" width="10" height="10" /></td> </tr> </table> </td> <td background="images/bx_right.jpg"></td> </tr> <tr> <td height="14"><img src="images/bx_3.gif" width="14" height="15"></td> <td background="images/bx_bottom.jpg" height="14"></td> <td height="14"><img src="images/bx_4.gif" width="14" height="15"></td> </tr> </table> <?php if ($rowxxx[sHOWCATS] == Yes || $rowxxx[sHOWCATS] == '') { ?> <br> <table border="0" cellspacing="0" cellpadding="0" width="100%" align="CENTER"> <tr> <td><img src="images/bx_1.gif" width="14" height="15"></td> <td background="images/bx_top.jpg"></td> <td><img src="images/bx_2.gif" width="14" height="15"></td> </tr> <tr> <td background="images/bx_left.jpg"></td> <td width="100%" bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="colorclass1"><img src="images/nw.gif" width="10" height="10" /></td> <td class="colorclass1"></td> <td class="colorclass1"><img src="images/ne.gif" width="10" height="10" /></td> </tr> <tr> <td class="colorclass1"> </td> <td class="colorclass1" width="100%"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <?php if (!empty($_GET[category])) { ?> <?PHP $SQLc = "SELECT * from CATEGORIES WHERE ID = '$_GET[category]'"; $resultc = @mysql_query( $SQLc ); $rowc = @mysql_fetch_array( $resultc ); $lastcat = $rowc[CATEGORY]; ////////////////// $MyCategoryTitle=EdURL($rowc[TITLE]); ///////////////// if (empty($rowc[CATEGORY])) { ?> <td><a href="index.php"><img src="images/arrow%20up%20Green.png" width="16" height="16" border="0"></a></td> <?PHP } else { ?> <td><a href="<?PHP mr("$MyCategoryTitle", "$rowc[CATEGORY]", "$rowxxx[MR]", "?page=browse&category="); ?>"><img src="images/arrow%20up%20Green.png" width="16" height="16" border="0"></a></td> <?PHP } ?> <?PHP } ?> <td class="padder5" width="100%"><a href="index.php"><b> <?php echo $s_index6; ?> </b></a></td> </tr> </table> </td> <td class="colorclass1"> </td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="padder5u"><img src="images/transparent.gif" width="20" height="5" /></td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="colorclass2"> </td> <td class="colorclass2" width="100%"> <img src="images/transparent.gif" width="10" height="5"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <?PHP $SQLc = "SELECT * from CATEGORIES WHERE CATEGORY = '$_GET[category]'"; $resultc = @mysql_query( $SQLc ); $rowc = @mysql_fetch_array( $resultc ); if (empty($rowc[CATEGORY])) { $wherearewe = top; } $SQLc = "SELECT * from CATEGORIES WHERE CATEGORY = '$_GET[category]'"; $resultc = @mysql_query( $SQLc ); $rowc = @mysql_fetch_array( $resultc ); if (!empty($rowc[CATEGORY])) { $wherearewe = notbottom; } if (empty($rowc[CATEGORY])) { $wherearewe = bottom; } if ($wherearewe == top) $category = ''; if ($wherearewe == notbottom) $category = $_GET[category]; if ($wherearewe == bottom) $category = $lastcat; $SQLcaT = "SELECT * from CATEGORIES WHERE CATEGORY = '$category' ORDER BY TITLE ASC"; $resultcaT = @mysql_query( $SQLcaT ); while( $rowcaT = @mysql_fetch_array( $resultcaT ) ) { ////////////////// $MyCategoryTitle=EdURL($rowcaT[TITLE]); ///////////////// ?> <tr> <td class="padder5" width = 100% colspan="2" nowrap><a href="<?PHP mr("$MyCategoryTitle", "$rowcaT[iD]", "$rowxxx[MR]", "?page=browse&category="); ?>"> <?php echo $rowcaT[TITLE]; ?> </a></td> </tr> <?PHP } ?> </table> </td> <td class="colorclass2"> </td> </tr> <tr> <td height="10"><img src="images/sw2.gif" width="10" height="10" /></td> <td class="colorclass2" height="10"></td> <td height="10"><img src="images/se2.gif" width="10" height="10" /></td> </tr> </table> </td> <td background="images/bx_right.jpg"></td> </tr> <tr> <td height="14"><img src="images/bx_3.gif" width="14" height="15"></td> <td background="images/bx_bottom.jpg" height="14"></td> <td height="14"><img src="images/bx_4.gif" width="14" height="15"></td> </tr> </table> <p> <?PHP } ?> </p> <table border="0" cellspacing="0" cellpadding="0" width="100%" align="CENTER"> <tr> <td><img src="images/bx_1.gif" width="14" height="15"></td> <td background="images/bx_top.jpg"></td> <td><img src="images/bx_2.gif" width="14" height="15"></td> </tr> <tr> <td background="images/bx_left.jpg"></td> <td width="100%" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="colorclass1"><img src="images/nw.gif" width="10" height="10" /></td> <td class="colorclass1"></td> <td class="colorclass1"><img src="images/ne.gif" width="10" height="10" /></td> </tr> <tr> <td class="colorclass1"> </td> <td class="colorclass1" width="100%"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <?php if (!empty($_GET[category])) { ?> <?PHP $SQLc = "SELECT * from CATEGORIES WHERE ID = '$_GET[category]'"; $resultc = @mysql_query( $SQLc ); $rowc = @mysql_fetch_array( $resultc ); $lastcat = $rowc[CATEGORY]; ////////////////// $MyCategoryTitle=EdURL($rowc[TITLE]); ///////////////// if (empty($rowc[CATEGORY])) { ?> <td><a href="index.php"><img src="images/arrow%20up%20Green.png" width="16" height="16" border="0"></a></td> <?PHP } else { ?> <td><a href="<?PHP mr("$MyCategoryTitle", "$rowc[CATEGORY]", "$rowxxx[MR]", "?page=browse&category="); ?>"><img src="images/arrow%20up%20Green.png" width="16" height="16" border="0"></a></td> <?PHP } ?> <?PHP } ?> <td class="padder5" width="100%"> </td> </tr> </table></td> <td class="colorclass1"> </td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="padder5u"><img src="images/transparent.gif" width="20" height="5" /></td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="colorclass2"> </td> <td class="colorclass2" width="100%"><img src="images/transparent.gif" width="10" height="5"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <?PHP $SQLc = "SELECT * from CATEGORIES WHERE CATEGORY = '$_GET[category]'"; $resultc = @mysql_query( $SQLc ); $rowc = @mysql_fetch_array( $resultc ); if (empty($rowc[CATEGORY])) { $wherearewe = top; } $SQLc = "SELECT * from CATEGORIES WHERE CATEGORY = '$_GET[category]'"; $resultc = @mysql_query( $SQLc ); $rowc = @mysql_fetch_array( $resultc ); if (!empty($rowc[CATEGORY])) { $wherearewe = notbottom; } if (empty($rowc[CATEGORY])) { $wherearewe = bottom; } if ($wherearewe == top) $category = ''; if ($wherearewe == notbottom) $category = $_GET[category]; if ($wherearewe == bottom) $category = $lastcat; $SQLcaT = "SELECT * from CATEGORIES WHERE CATEGORY = '$category' ORDER BY TITLE ASC"; $resultcaT = @mysql_query( $SQLcaT ); while( $rowcaT = @mysql_fetch_array( $resultcaT ) ) { ////////////////// $MyCategoryTitle=EdURL($rowcaT[TITLE]); ///////////////// ?> <tr> <td class="padder5" width = 100% colspan="2" nowrap> </td> </tr> <?PHP } ?> </table></td> <td class="colorclass2"> </td> </tr> <tr> <td height="10"><img src="images/sw2.gif" width="10" height="10" /></td> <td class="colorclass2" height="10"></td> <td height="10"><img src="images/se2.gif" width="10" height="10" /></td> </tr> </table></td> <td background="images/bx_right.jpg"></td> </tr> <tr> <td height="14"><img src="images/bx_3.gif" width="14" height="15"></td> <td background="images/bx_bottom.jpg" height="14"></td> <td height="14"><img src="images/bx_4.gif" width="14" height="15"></td> </tr> </table></td> <td valign=bottom><img src="images/transparent.gif" width="10" height="10"></td> <td class="space" width="100%" valign="TOP"> <table border="0" cellspacing="0" cellpadding="0" width="100%" align="CENTER"> <tr> <td><img src="images/bx_1.gif" width="14" height="15"></td> <td background="images/bx_top.jpg"></td> <td><img src="images/bx_2.gif" width="14" height="15"></td> </tr> <tr> <td height="158" background="images/bx_left.jpg"></td> <td width="100%" bgcolor="#FFFFFF"> <img src="../../../Documents/Unnamed Site 3/header_bg.jpg" width="900" height="250"></td> <td background="images/bx_right.jpg"></td> </tr> <tr> <td height="14"><img src="images/bx_3.gif" width="14" height="15"></td> <td background="images/bx_bottom.jpg" height="14"></td> <td height="14"><img src="images/bx_4.gif" width="14" height="15"></td> </tr> </table> <p align=right class=itty_link> </p> </td> </tr> </table> </body> </html>
  2. You can see exactly whats its doing at www.digitaldesignersmall.com/reg/register.php Stuff just isnt working and even when i purposely try to make a error occur its not going to the right place <?php include('connection.php'); $test1=$_POST['firstname']; $test2=$_POST['lastname']; $test3=$_POST['username']; if (!eregi("([^A-Za-z0-9])",$test1)){ if (!eregi("([^A-Za-z])",$test2)){ if (!eregi("([^A-Za-z])",$test3)){ $query="SELECT * FROM merchants WHERE username = '$_POST(username)'"; $result=mysql_query($query); $num=mysql_num_rows($result); if ($num == 0) { $query1="SELECT * FROM merchants WHERE email = '$_POST(email)'"; $result1=mysql_query($query1); $num1=mysql_num_rows($result1); if ($num1 == 0) { if (($_POST['password']==$_POST['password1'])&&($_POST['email']==$_POST['email1'])) { $name=strip_tags($_POST['username']); $first=strip_tags($_POST['firstname']); $last=strip_tags($_POST['lastname']); $pass=strip_tags($_POST['password']); $country=strip_tags($_POST['country']); $address=strip_tags($_POST['address']); $email=strip_tags($_POST['email']); $city=strip_tags($_POST['city']); $zip=strip_tags($_POST['zipcode']); $state=strip_tags($_POST['state']); $phone=strip_tags($_POST['phonenumber']); $aql="INSERT INTO merchants SET username='$name', firstname='$first', lastname='$last', email='$email', Country='$country', zipcode='$zip', password='$pass', city='$city', state='$state', phonenumber='$phone', address='$address'"; $result=mysql_query($sql); if ($result){ header("location:http://www.digitaldesignersmall.com/ffx.html"); } else { header("location:http://www.digitaldesignersmall.com/fff.html"); } } else{ header("location:http://www.digitaldesingersmall.com/afx.html"); } } else { header("location:http://www.digitaldesingersmall.com/afx.html"); } } else{ header("location:http://www.digitaldesignersmall.com/cxs.html"); } } else{ header("location:http://www.digitaldesignersmall.com/cxs.html"); } } else{ header("location:http://www.digitaldesignersmall.com/cxs.html"); } } ?> MOD EDIT: . . . tags added.
  3. ok i will be honest i did start learning this just for one purpose. I will further by saying I really dislike coding in general. But my mother has been wanting this for so long and cant afford to fork out so much money and now i am so overwhelmed trying to learn it. I dont even need to know how to do the actual "site" just the addition to for vendors to sell through me. And now i see now means of doing so....
  4. basically i need to build a "multi-vendor" site. I need to be able to allow people to register and have control panels to list and view the items they have posted.
  5. I am trying to get a website up for my mother and am running into so many brick walls. There is so much i dont know about php. I know basics. What i would really love is some to try to tutor me through what i need to know. If anyone could do this for me i would be forever grateful.
  6. I am very new to all this..... Here is my log in code. <?php include ('connection.php'); $username = mysql_real_escape_string($_POST['username5']); $password = mysql_real_escape_string($_POST['password5']); $results = mysql_query("SELECT url FROM merchants WHERE username='$username' AND password='$password'"); if (mysql_num_rows($results)) { $values = mysql_fetch_array($results); $url = $values['url']; header("Location: $url"); } else { echo 'Wrong data yo!'; } ?>
  7. umm what code? i need code to make a page inaccessible to anyone but the logged in person.
  8. I have got athe user login gate and everything working well excrpt that i made it so when the user logs in they are redirected to there control panel. The only issue is that anyone can completely skip the login and just type in the url of the control panel to get to it. How do i make so the only way to get to these pages is to log in.
  9. I used your code but the on,ly thing is no matter if i put the right username and password or not it returns to be wrong and i dont know what hashed means
  10. I am self taught and am trying very hard to get a log in page to work. The way i want it to work is that when they log in it uses a url stored in the database for their account. But i am having some much trouble working out a code that works and this is all i got: <?php include ('connection.php'); $username=$_POST['username5']; $password=$_POST['password5']; $query="SELECT password FROM merchants WHERE username = '$_POST(username5)'"; if ($password == $query) { $url = "SELECT url FROM merchants WHERE username = '$_POST(username5)'"; header("Location: $url"); } else { echo urgh } ?>
  11. Butler

    Need help

    <?php include ('connection.php'); $username=$_POST['username5']; $password=$_POST['password5']; $query="SELECT password FROM merchants WHERE username = '$_POST(username5)'"; if ($password == $query) { $url = "SELECT url FROM merchants WHERE username = '$_POST(username5)'"; header("Location: $url"); } else { //change later echo urgh } ?> I am self taught and am trying to figure soe things out and i am unable to get this to work. Can anyone help?
  12. what does $rows = ???
  13. i am building a log in gate and am trying to figure out how i could make it so that when the user logs in it takes them to a url i have stored for them in the table
  14. the only issue i got now and i dont know if you can help with it is that the error pages dint show up when i purposely make the test fail.
  15. Thank you. I am very new to this and self taught. the only thing left is this error: Fatal error: Function name must be a string in /home/swirish/public_html/registernext.php on line 4
×
×
  • 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.