Jump to content

oavs

Members
  • Posts

    56
  • Joined

  • Last visited

Everything posted by oavs

  1. Hi Client wants to know which agents's custumers are filling out his online booking form. Is there a easy way of doing this ? is there a php code which might handle this? Ultimately when the client receives his online form booking of a customer, client wants to know which agent referred him/her(customer who filled out the form). many thanks in advance Main CLIENT AGENT 1 AGENt2 AGENT3 ... AGENT100 Cust01 Cust05 Cust07 Cust02 Cust06 Cust08 Cust03
  2. Thanks , i need lttle more showing please. I have to change these style attributes. I will have three options (frame option) for the same image. [code] background: #850 url('wood1.jpg'); border: outset #a50 5px; float: left; padding: 30px; margin: 20px; background-image: url(store/includes/templates/art_000/images/borders/wood1.jpg);[/code] What is also diffucult for me to figure out is to use it with the code below which it is a zencart image pop up code. [code]<div class="pix">   <!-- popup 1 -->   <?php   // $products_values->fields['products_image']   echo '<a href="javascript:window.close()">' . zen_image($products_image_large, $products_values->fields['products_name'] . ' ' . TEXT_CLOSE_WINDOW) . '</a>'; ?> </div> [/code] I really need someone to explain please as I am still learning php and css. Thanks
  3. Hi I want to be able create a border around my images with a ledgend under the images with 3-4 options to change the color of the image. here is what I have so far. [url=http://www.arthq.com.au/store/index.php?main_page=products_new]http://www.arthq.com.au/store/index.php?main_page=products_new[/url] Once you go there you need to select the item 'Modern Art' in order to see my popup and the effect I want to get. Popup does not open 100% (??) so you need to stretch it to see . On that pop up you will see - image with a frame (which is a jpeg picture image) showing as border. What I need to do is have a ledgen below the image with its border so that user can select different borders  (with the page refreshing it self) If the image border is too hard then I will settle with color only. Oh one more thing when you do select the color image popup closes (it should stay unless image it self is clicked to close). Well how hard is that. Well its damn hard for me after spending hours to get this far and could not find any reference to displaced CSS image border change thingy. Hope you can help. Many thanks.
  4. thanks. now its little easier to search for.
  5. Hi Not sure what it is called but what it does is on the follwoing URL link. Basickly it hides either a form  or the email . It makes it ' human read ' page so that forms can not be submitted by automatic spamm bots. Like here: [url=http://cracker.com.au/classifieds/sydney/for-sale/cd-dvd/204153582.aspx]http://cracker.com.au/classifieds/sydney/for-sale/cd-dvd/204153582.aspx[/url] I know there is a thing called 'Captcher' [url=http://whitehatcrew.com/captcher/]http://whitehatcrew.com/captcher/[/url] but I want to have a look at the other alternatives with the similar idea.  Can anyone please help with the script's availibilty. Many thanks
  6. Thank you both. kenrbnsn, your code worked perfect. Thanks for doing that :-)
  7. Hi Orio, thanks for your help and it's really appreciated. I am not familiar with use of functions. In order to use it,  would I use the function just before  the $listed = $misc->make_db_unsafe($recordSet->fields['listingsdb_creation_date']); statement ? Can you please tell me how I could use within my code please?
  8. Hi I like to now or more to the point shown how to convert my date from (2006-07-02) to 02-07-2006 on my display page. Here is the code below. Date is listed in the <td >($listed)</td> As is date is shown on the page as  (2006-07-02) Thanks for your kind help. [code]function publicstats_install_addon() {     }     function publicstats_show_admin_icons() {     }     function publicstats_load_template() {         $template_array = array('addon_publicstats_link', 'addon_publicstats_page');         return $template_array;     }     function publicstats_run_action_user_template() {         switch ($_GET['action']) {             case 'addon_publicstats_page':             $data = publicstats_display_addon_page();             break;             default:             $data = '';             break;         } // End switch ($_GET['action'])         return $data;     }     function publicstats_run_action_admin_template() {         switch ($_GET['action']) {             case 'addon_publicstats_admin':             $data = publicstats_display_admin_page();             break;             default:             $data = '';             break;         } // End switch ($_GET['action'])         return $data;     }     function publicstats_run_template_user_fields($tag = '') {         switch ($tag) {             case 'addon_publicstats_page':             $data = publicstats_display_addon_page();             break;             case 'addon_publicstats_link':             $data = publicstats_display_addon_link();             break;             default:             $data = '';             break;         } // End switch ($_GET['action'])         return $data;     }         // Addon Specific Function     function publicstats_display_addon_link() {         $display = '<li><a href="index.php?action=addon_publicstats_page">Stats</a></li>';         return $display;     }     function publicstats_display_addon_page() {         global $conn, $config, $lang, $count, $num_of_listings, $table_border;         require_once($config['basepath'].'/include/misc.inc.php');         $misc = new misc(); // start our display in a table         $display = "<table border=\"0\" width=\"100%\" id=\"table1\"> <tr> <td><u><strong>Listing Titles</strong></u> </td> <td align=\"center\"><u><strong>Seller ID</strong></u> </td> <td><u><strong>Listed On</strong></u></td> <td><u><strong>Price</strong></u> </td> <td align=\"center\"><u><strong>Viewed</strong></u> </td> </tr>";         $count = 0;         $sql = "SELECT * FROM en_listingsdb WHERE listingsdb_active = 'yes' ORDER BY listingsdb_hit_count DESC LIMIT 0 , 30";         $recordSet = $conn->Execute($sql);         if ($recordSet === false) {             $misc->log_error($sql);         }         while (!$recordSet->EOF) {             $id = $misc->make_db_unsafe($recordSet->fields['listingsdb_id']);             $title = $misc->make_db_unsafe($recordSet->fields['listingsdb_title']);             $agent = $misc->make_db_unsafe($recordSet->fields['userdb_id']);             $hits = $misc->make_db_unsafe($recordSet->fields['listingsdb_hit_count']);     $listed = $misc->make_db_unsafe($recordSet->fields['listingsdb_creation_date']);     // Get the Price from the listingsdbelements table     $sql1 = "SELECT listingsdbelements_field_value FROM ".$config['table_prefix']."listingsdbelements WHERE listingsdbelements_field_name = 'price' AND listingsdb_id = '$id'";             $recordSet1 = $conn->Execute($sql1); if ($recordSet1 === false) { $misc->log_error($sql1); } $Price = $misc->make_db_unsafe ($recordSet1->fields['listingsdbelements_field_value']);             # VISABLE LINKS AND TEXT # $display .= "<tr> <td><a href=\"index.php?action=listingview&listingID=$id\">$title</a> </td> <td align=\"center\"><a href=\"index.php?action=view_user&user=$agent\">$agent</a> </td> <td >($listed)</td> <td>$ $Price</td> <td align=\"center\">($hits)</td> </tr> ";             //$display .= "<a href=\"index.php?action=view_user&user=$agent\">Agent Number $agent</a> Owns The listing <a href=\"index.php?action=listingview&listingID=$id\">$title</a> has been viewed  ($hits) Times<br>";             # END VISABLE LINKS AND TEXT #             $recordSet->MoveNext();         } // end while $display .= "</table><br/>";         return $display;     }     // Addon Specific Function     function publicstats_display_admin_page() {         $display = 'This is a Addon page';         return $display;     }     ?> [/code]
  9. Hi That is exacly what I need to do but not sure how. Have a look at my code if you could and advise if you can futher please. I have following code above the <body> tag [code]<?php include_once "myconnect.php"; function left($cid) { $keyword=""; $type=1; $radio=1; if(isset($_REQUEST["keyword"]) && $_REQUEST["keyword"]<>"") $keyword=$_REQUEST["keyword"]; if(isset($_REQUEST["type"]) && $_REQUEST["type"]<>"") $type=$_REQUEST["type"]; if(isset($_REQUEST["radio"]) && $_REQUEST["radio"]<>"") $radio=$_REQUEST["radio"]; ?>[/code] then I have the search form - [code]<form name="form2" method="post" action="/manage/showcategory.php">                <input name="keyword" type="text" value="<? //echo $keyword;?>" style="width:115px; background:#ffffff url(/images/pwsearch.gif) no-repeat center;" onmouseover="this.style.backgroundImage = 'none'"/> <input type="submit" name="Submit2" value="Go" />                                      <select name="cid">                       <option value=0 selected >Select a prefix</option>                           <?               $cats=mysql_query("select * from sbclassified_categories where pid=0 order by cat_name");               while($rst=mysql_fetch_array($cats))               {                                    ?>                       <option value="<? echo $rst["id"]; ?>" <? if($rst["id"]==$cid) echo " selected ";?>             <? echo $rst["cat_name"]; ?></option>                                   <?                     }//end while                      ?>                     </select>                                        <select name="type">                         <option value=1 <? if($type==1) echo " selected ";?>>Current</option>                         <option value=3 <? if($type==3) echo " selected ";?>>New  Today</option>                         <option value=4 <? if($type==4) echo " selected ";?>>Ending  Today</option>                         <option value=5 <? if($type==5) echo " selected ";?>>Expired</option>                         <option value=6 <? if($type==6) echo " selected ";?>>All</option>                       </select>                                   <input name="radio" type="radio" value="1" <? if($radio==1) echo " checked ";?> /> Item  &amp; desc              <input type="radio" name="radio" value="2" <? if($radio==2) echo " checked ";?> /> Item #              <input type="radio" name="radio" value="3" <? if($radio==3) echo " checked ";?> /> Vendor                              </form>[/code]
  10. Hi, I have a website wich has a search facility to search our database. Is there way of storing or saving every keyword entered that used in the serach box?.. and how? Basicly at the moment it does search through the database and displays the results. What I need to know is what people is entering into the search box to carry on their searches . can some one plese have a guided explanation how this could be done so that it searches > displays the search results but records the keyword entered without letting the user know. Thanks in advance
  11. Hi I have a script does two things. 1. It selects typed words and displays as capitalise. 2. It also display the typed word in its corresponding numerical configuration as per 'phone keypad' (eg regular phone key pad 2=abc, 3=def etc. etc. ) IT is all working BUT I need to make some changes and I can not get it to work. I would really appreciate if someone give me a working example as I am very new to js. Many thanks in advance Smile For example I want users to be able to enter dashes, spaces and numeral (- and 0-9) up to maximum 13 digits and characters long including the dashes. So they could enter PHONE-2BANK or PHONE-2-BANKS or 2-PHONE or PHONE BANK AND as results I want to display as one of the following(depending on what has been entered):In the numbers only section I want to trim and only diplay the first 7 digits. Entered: PHONE-2BANK PHONE-2-BANKS 2-PHONE PHONE BANK Results : PHONE-2BANK PHONE-2-BANKS 2-PHONE PHONE BANK(note space between the two words) 74663-2 74663-2-2 2-74663 74663 22 <script type="text/javascript" language="JavaScript"> <!-- function phonewordForm() { var Phoneword = document.getElementById("Phoneword").value; var box = document.wonder.prefix; var pref = box.options[box.selectedIndex].text; Phoneword = Phoneword.toLowerCase(); // Clean the Phoneword, remove anything that isnt a alpha. var filterPhoneword = ""; for(var i = 0; i < Phoneword.length; i++) { var alpha = Phoneword.charAt(i); if(alpha >= "a" && alpha <= "z") filterPhoneword += alpha; } // Check if the Phoneword is of correct character length. if(filterPhoneword.length > 13 || filterPhoneword.length < 4) alert("Type between 4 - 13 alphabetic characters, not numbers.\n Example: FLOWERS, PETCARE, FINANCE etc. "); else { document.getElementById("FormResults").style.display = "block"; var number = getNumber(Phoneword); var bigPhoneWordString = pref + " " + filterPhoneword; document.getElementById("boldPhoneword").innerHTML = bigPhoneWordString.toUpperCase(); document.getElementById("numberPhoneword").innerHTML = " " +"(" + number + ")"; // Inactivate form above. document.getElementById("Phoneword").disabled = true; document.getElementById("prefix").disabled = true; document.getElementById("demo").disabled = true; document.getElementById("preferred_Phoneword").value = document.getElementById("Phoneword").value; document.getElementById("form_prefix").value = pref; } return false; } function getNumber(Phoneword) { var numberString = ""; for(var i = 0; i < Phoneword.length; i++) { var alpha = Phoneword.charAt(i); if(alpha >= "a" && alpha <= "c")numberString += 2 ; else if(alpha >= "d" && alpha <= "f")numberString += 3; else if(alpha >= "g" && alpha <= "i")numberString += 4; else if(alpha >= "j" && alpha <= "l")numberString += 5; else if(alpha >= "m" && alpha <= "o")numberString += 6; else if(alpha >= "p" && alpha <= "s")numberString += 7; else if(alpha >= "t" && alpha <= "v")numberString += 8; else if(alpha >= "w" && alpha <= "z")numberString += 9; } return numberString; } function noSubmit() { return phonewordForm(); } --> </script>
  12. Does anyone know why I am getting the message \'Query was empty\' I get this \'Query was empty\' after inserting code line //3 Also my record set dissappearing from the DW MX server behavior window after the code marked //3. <?php require_once(\'../Connections/connMDB.php\'); ?> <?php // 1 $txtKeywords_rsResults = "myKeywords"; if (isset($HTTP_POST_VARS[\'txtKeywords\'])) { $txtKeywords_rsResults = (get_magic_quotes_gpc()) ? $HTTP_POST_VARS[\'txtKeywords\'] : addslashes($HTTP_POST_VARS[\'txtKeywords\']); } $txtArtist_rsResults = "myArtist"; if (isset($HTTP_POST_VARS[\'txtArtist\'])) { $txtArtist_rsResults = (get_magic_quotes_gpc()) ? $HTTP_POST_VARS[\'txtArtist\'] : addslashes($HTTP_POST_VARS[\'txtArtist\']); } $txtTitle_rsResults = "myTitle"; if (isset($HTTP_POST_VARS[\'txtTitle\'])) { $txtTitle_rsResults = (get_magic_quotes_gpc()) ? $HTTP_POST_VARS[\'txtTitle\'] : addslashes($HTTP_POST_VARS[\'txtTitle\']); } // 2 mysql_select_db($database_connMDB, $connMDB); $rsResults = mysql_query($query_rsResults, $connMDB) or die(mysql_error()); $row_rsResults = mysql_fetch_assoc($rsResults); $totalRows_rsResults = mysql_num_rows($rsResults); // 3 if ($HTTP_POST_VARS[\'radType\']==\'AND\') { $query_rsResults = sprintf("SELECT mdbTable.AlbumName, mdbTable.AlbumArtist, mdbTable.Keywords FROM mdbTable WHERE mdbTable.AlbumName LIKE \'%%%s%%\' AND mdbTable.AlbumArtist LIKE \'%%%s%%\' AND mdbTable.Keywords LIKE \'%%%s%%\'", $txtTitle_rsResults,$txtArtist_rsResults,$txtKeywords_rsResults); } else { // 4 $fieldArray = array(); // 5 if ($txtTitle_rsResults!=\'\') { $fieldArray[count($fieldArray)] = sprintf("mdbTable.AlbumName LIKE \'%%%s%%\'",$txtTitle_rsResults); } if ($txtArtist_rsResults!=\'\') { $fieldArray[count($fieldArray)] = sprintf("mdbTable.AlbumArtist LIKE \'%%%s%%\'",$txtAuthor_rsResults); } if ($txtKeywords_rsResults!=\'\') { $fieldArray[count($fieldArray)] = sprintf("mdbTable.Keywords LIKE \'%%%s%%\'",$txtKeywords_rsResults); } // 6 $query = implode(" OR ",$fieldArray); if ($query=="") { $query_rsResults = "SELECT * FROM mdbTable WHERE AlbumID=0"; } else { // 7 $query_rsResults = "SELECT mdbTable.AlbumName, mdbTable.AlbumArtist, mdbTable.Keywords FROM mdbTable WHERE ".$query; } } // 8 - end of Serach Code ?>
  13. Hello Palle, You obviously know the answer to my problem. I can not get any other answer as close as yours. I am a newbie. In my previous post you answered me but I still need further help please. Why am I getting a blank page? <?php // at the top of mdbedit.php session_start(); // restore session $username = $_SESSION[\'username\']; // THE ABOVE WILL RESTORE THE SESSION, AND PUT THE CONTENT OF THE SESSION VARIABLE USERNAME into the variable $username. <?php require_once(\'../Connections/connMDB.php\'); ?> <?php function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; switch ($theType) { case "text": $theValue = ($theValue != "") ? "\'" . $theValue . "\'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "\'" . doubleval($theValue) . "\'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "\'" . $theValue . "\'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } $editFormAction = $HTTP_SERVER_VARS[\'PHP_SELF\']; if (isset($HTTP_SERVER_VARS[\'QUERY_STRING\'])) { $editFormAction .= "?" . $HTTP_SERVER_VARS[\'QUERY_STRING\']; } if ((isset($HTTP_POST_VARS["MM_update"])) && ($HTTP_POST_VARS["MM_update"] == "updateForm")) { $updateSQL = sprintf("UPDATE mdbTable SET AlbumCatalogNumber=%s, AlbumArtist=%s, AlbumName=%s, Genre=%s, AlbumLabel=%s, AlbumYearReleased=%s, Type=%s, AlbumTracks=%s, AlbumCountry=%s, AlbumCondition=%s, AlbumPrice=%s, AlbumNotes=%s, AlbumQty=%s, AlbumCoverURL=%s, AlbumCoverThumbnailURL=%s WHERE AlbumID=%s", GetSQLValueString($HTTP_POST_VARS[\'AlbumCatalogNumber\'], "text"), etc etc . rest of the code
  14. Thanks again Pell, OK I get this , but <?php // at the top of mdbedit.php session_start(); // restore session $username = $_SESSION[\'username\']; ?> # THE ABOVE WILL RESTORE THE SESSION, AND PUT THE CONTENT OF THE SESSION VARIABLE USERNAME into the variable $username. <?php require_once(\'../Connections/connMDB.php\'); ?> ----------------- and thankyou for the explanation. but what is this -$theValue / $theDefinedValue / $theNotDefinedValue and case \"text\": should I be changing any of these or add anything ? or that is it ?
  15. Thanks Palle, Thanks for your time to look at it. As I have said , I am a novice, how ever I have come thios far in a week. There are lots I still do not know. Can you please give some examples of how you would restore the session in the mdbedit.php page... as for Otherwise you should get the cd owners username back from sql as well, do the check in php (against $_SESSION[\'username\']) and output an errormessage like \"Not your cd!\"... ------------- ..you are right. I do have concerns about this. How should I code this page so that if you change the AlbumID174 to say AlbumID172 you will get an errormessage like \"Not your cd!\"... Although I am using them with DWMX, sessions are still a mistery to me. Thankyou again
  16. Still no good. I must be doing some thing ?? I have tried <?php // at the top of mdbedit.php if ( !isset($_GET[\'username\']) ) { exit; } WITH and WITHOUT this code if ( $_GET[\'username\'] != $_SESSION[\'username\'] ) { exit; } ?> This takes me to the page fine - Still I can replace 175 with 174 and access to other user records. http://www.oavs.com.au/membership/mdbedit....D=175&jack=jack and you should get the error message. >>now try using the original url: http://www.oavs.com.au/membership/mdbedit....2&username=jack and it should work This does not work if I have both of your lines in your code. This time here is the total code for the Page report.php (report.php has the edit link to call mdbedit.php) <?php require_once(\'../Connections/connMDB.php\'); ?> <?php session_start(); ?> <?php ob_start(); ?> <?php # BuildNav for Dreamweaver MX v0.2 starts here # 10-02-2002 # Alessandro Crugnola [TMM] # sephiroth: alessandro@sephiroth.it # http://www.sephiroth.it # # Function for navigation build :: function buildNavigation($pageNum_Recordset1,$totalPages_Recordset1,$prev_Recordset1,$next_Recordset1,$separator=" | ",$max_links=10, $show_page=true) { GLOBAL $maxRows_rsReport,$totalRows_rsReport; $pagesArray = ""; $firstArray = ""; $lastArray = ""; if($max_links<2)$max_links=2; if($pageNum_Recordset1<=$totalPages_Recordset1 && $pageNum_Recordset1>=0) { if ($pageNum_Recordset1 > ceil($max_links/2)) { $fgp = $pageNum_Recordset1 - ceil($max_links/2) > 0 ? $pageNum_Recordset1 - ceil($max_links/2) : 1; $egp = $pageNum_Recordset1 + ceil($max_links/2); if ($egp >= $totalPages_Recordset1) { $egp = $totalPages_Recordset1+1; $fgp = $totalPages_Recordset1 - ($max_links-1) > 0 ? $totalPages_Recordset1 - ($max_links-1) : 1; } } else { $fgp = 0; $egp = $totalPages_Recordset1 >= $max_links ? $max_links : $totalPages_Recordset1+1; } if($totalPages_Recordset1 >= 1) { # ------------------------ # Searching for $_GET vars # ------------------------ $_get_vars = \'\'; if(!empty($_GET) || !empty($HTTP_GET_VARS)){ $_GET = empty($_GET) ? $HTTP_GET_VARS : $_GET; foreach ($_GET as $_get_name => $_get_value) { if ($_get_name != "pageNum_rsReport") { $_get_vars .= "&$_get_name=$_get_value"; } } } $successivo = $pageNum_Recordset1+1; $precedente = $pageNum_Recordset1-1; $firstArray = ($pageNum_Recordset1 > 0) ? "<a href="$_SERVER[PHP_SELF]?pageNum_rsReport=$precedente$_get_vars">$prev_Recordset1</a>" : "$prev_Recordset1"; # ---------------------- # page numbers # ---------------------- for($a = $fgp+1; $a <= $egp; $a++){ $theNext = $a-1; if($show_page) { $textLink = $a; } else { $min_l = (($a-1)*$maxRows_rsReport) + 1; $max_l = ($a*$maxRows_rsReport >= $totalRows_rsReport) ? $totalRows_rsReport : ($a*$maxRows_rsReport); $textLink = "$min_l - $max_l"; } $_ss_k = floor($theNext/26); if ($theNext != $pageNum_Recordset1) { $pagesArray .= "<a href="$_SERVER[PHP_SELF]?pageNum_rsReport=$theNext$_get_vars">"; $pagesArray .= "$textLink</a>" . ($theNext < $egp-1 ? $separator : ""); } else { $pagesArray .= "$textLink" . ($theNext < $egp-1 ? $separator : ""); } } $theNext = $pageNum_Recordset1+1; $offset_end = $totalPages_Recordset1; $lastArray = ($pageNum_Recordset1 < $totalPages_Recordset1) ? "<a href="$_SERVER[PHP_SELF]?pageNum_rsReport=$successivo$_get_vars">$next_Recordset1</a>" : "$next_Recordset1"; } } return array($firstArray,$pagesArray,$lastArray); } # BuildNav for Dreamweaver MX v0.2 ends here ?> // effigy table code actually starts here >>>>>>>>>>> <?php $maxRows_rsReport = 20; $pageNum_rsReport = 0; if (isset($HTTP_GET_VARS[\'pageNum_rsReport\'])) { $pageNum_rsReport = $HTTP_GET_VARS[\'pageNum_rsReport\']; } $startRow_rsReport = $pageNum_rsReport * $maxRows_rsReport; mysql_select_db($database_connMDB, $connMDB); $query_rsReport = "SELECT * FROM mdbTable WHERE mdbTable.username = \'$username\' ORDER BY AlbumArtist ASC"; $query_limit_rsReport = sprintf("%s LIMIT %d, %d", $query_rsReport, $startRow_rsReport, $maxRows_rsReport); $rsReport = mysql_query($query_limit_rsReport, $connMDB) or die(mysql_error()); $row_rsReport = mysql_fetch_assoc($rsReport); if (isset($HTTP_GET_VARS[\'totalRows_rsReport\'])) { $totalRows_rsReport = $HTTP_GET_VARS[\'totalRows_rsReport\']; } else { $all_rsReport = mysql_query($query_rsReport); $totalRows_rsReport = mysql_num_rows($all_rsReport); } $totalPages_rsReport = ceil($totalRows_rsReport/$maxRows_rsReport)-1; ?> <html><!-- InstanceBegin template="/Templates/ICI_Template.dwt" codeOutsideHTMLIsLocked="false" --><head> <!-- <link rel="shortcut icon" href="favicon.ico" /> --> <!-- InstanceBeginEditable name="doctitle" --> <title>iCollectIt</title> <!-- InstanceEndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <!-- InstanceBeginEditable name="head" --> <!-- InstanceEndEditable --> </head> <body topmargin="2"> <table width="95%" border="0"> <tr> <td width="247" height="62" valign="top"><img src="../Logos/ICI-Banner.gif" width="243" height="56"></td> <td width="527" align="left" valign="middle" nowrap> <blockquote> <p><font color="#0099CC" size="6" face="Arial, Helvetica, sans-serif"><strong>Rare and Collectable <br> CD\'s, DVD\'s and Vinyl\'s</strong></font></p> </blockquote></td> <td width="11"> </td> </tr> <tr> <td height="3" colspan="2" valign="top" bgcolor="#006699"></td> <td> </td> </tr> <tr> <td height="18" colspan="2" valign="top"> <div align="center"><em><font color="#CCCCCC" size="5" face="Arial, Helvetica, sans-serif"><strong>. . . . make us an offer we can\'t refuse</strong></font></em></div></td> <td> </td> </tr> </table> <!-- InstanceBeginEditable name="Body" --> <table width="72%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="5" rowspan="5" valign="top"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif"><a href="mdblogout.php"><img src="../images/arrow-top.gif" width="19" height="10" border="0">Logout<br> </a></font><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif"><a href="mdbMemberReport.php"><img src="../images/arrow-top.gif" width="19" height="10" border="0">Admin Report<br> <img src="../images/arrow-top.gif" width="19" height="10" border="0">Member Report <br> </a></font><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif"><a href="mdbGenreReport.php"><img src="../images/arrow-top.gif" width="19" height="10" border="0">Genre List</a></font><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif"><a href="mdbTypeReport.php"><br> <img src="../images/arrow-top.gif" width="19" height="10" border="0">Type List</a><a href="mdbGenreReport.php"></a></font><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif"><a href="mdbadd.php"><br> <img src="../images/arrow-top.gif" width="19" height="10" border="0">Add Item</a></font></td> <td> </td> <td colspan="17"><div align="center"><font color="#990000" size="2" face="Arial, Helvetica, sans-serif"><strong>Admin Item Report / Update</strong></font></div></td> <td> </td> </tr> <tr> <td></td> <td colspan="17" rowspan="2"> <? if($_SESSION[\'user_level\'] == 1){ echo "<font face="Arial" size="2"> Members Item Report / Update<br> <a href=mdblogout.php>Logout</a><br /> <a href=mdbAdd.php>Add Items</a><br /> <a href=mdbMemberReport.php>Member Report</a><br /> <a href=report.php>Update Items / View Member Report</a><br /></font>"; } if($_SESSION[\'user_level\'] == 2){ echo "<font face="Arial" size="2"> Admin Item Report / Update<br> <a href=mdblogout.php>Logout</a><br /> <a href=mdbadd.php>Add Item</a><br/> <a href=mdbadminReport.php>View Master Report</a><br /> <a href=report.php>Update Any Item</a><br /></font>"; } ?> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td colspan="7"><div align="right"><strong><font size="2" face="Arial, Helvetica, sans-serif">Total of <?php echo min($startRow_rsReport + $maxRows_rsReport, $totalRows_rsReport) ?> / <?php echo $totalRows_rsReport ?> records</font></strong></div></td> <td> </td> </tr> <tr> <td nowrap> </td> <td bgcolor="#6666FF"> </td> <td bgcolor="#6666FF"><font size="1" face="Arial, Helvetica, sans-serif"> </font><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><strong>Edit</strong></font></td> <td bgcolor="#6666FF"> </td> <td bgcolor="#6666FF"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><strong>User</strong></font> </td> <td bgcolor="#6666FF"> </td> <td bgcolor="#6666FF"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><strong>ID</strong></font></td> <td bgcolor="#6666FF"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"> </font></td> <td bgcolor="#6666FF"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><strong>Number</strong></font></td> <td bgcolor="#6666FF"> </td> <td bgcolor="#6666FF"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><strong>Artist</strong></font></td> <td height="0" bgcolor="#6666FF"> </td> <td bgcolor="#6666FF"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><strong>Title</strong></font></td> <td bgcolor="#6666FF"> </td> <td bgcolor="#6666FF"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><strong>Genre</strong></font></td> <td bgcolor="#6666FF"> </td> <td bgcolor="#6666FF"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><strong>Type</strong></font></td> <td bgcolor="#6666FF"> </td> <td bgcolor="#6666FF"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><strong>Condition</strong></font></td> <td bgcolor="#6666FF"> </td> <td bgcolor="#6666FF"><div align="center"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><strong>Buy or Offer</strong></font></div></td> <td bgcolor="#6666FF"> </td> <td bgcolor="#6666FF"><div align="center"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><strong>QTY</strong></font></div></td> <td bgcolor="#6666FF"> </td> </tr> <?php do { ?> <tr> <td nowrap> </td> <td ><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td> <td bgcolor="#EAFEFF"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong> <!-- HERE IS THE URL CODE !!! -> <a href="mdbedit.php?AlbumID=<?php echo $row_rsReport[\'AlbumID\']; ?>&username=<?php echo $HTTP_SESSION_VARS[\'username\']; ?>">Edit</a></strong></font></td> <!-- HERE IS THE URL CODE !!! -> <td bgcolor=""><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td> <td bgcolor="#FBFDEC"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_rsReport[\'username\']; ?></font></td> <td bgcolor=""> </td> <td bgcolor="#FBFDEC"><font color="#CCCCCC" size="2" face="Arial, Helvetica, sans-serif"><?php echo $row_rsReport[\'AlbumID\']; ?></font></td> <td bgcolor=""><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td> <td nowrap bgcolor="#EAFEFF"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_rsReport[\'AlbumCatalogNumber\']; ?></font></td> <td bgcolor=""><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td> <td nowrap bgcolor="#EAEAFF"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_rsReport[\'AlbumArtist\']; ?></font></td> <td height="0" bgcolor=""><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td> <td nowrap bgcolor="#FFEAEA"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_rsReport[\'AlbumName\']; ?></font></td> <td bgcolor=""><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td> <td nowrap bgcolor="#FFEFAE"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_rsReport[\'Genre\']; ?></font></td> <td bgcolor=""><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td> <td bgcolor="#FFFFEA"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_rsReport[\'Type\']; ?></font></td> <td bgcolor="" ><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td> <td bgcolor="#EAFFEA"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_rsReport[\'AlbumCondition\']; ?></font></td> <td bgcolor=""><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td> <td bgcolor="#FFF7EA"><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_rsReport[\'AlbumPrice\']; ?></font></div></td> <td bgcolor=""><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td> <td bgcolor="#F1FFEA"><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_rsReport[\'AlbumQty\']; ?></font></div></td> <td> </td> </tr> <tr> <td nowrap> </td> <td height="0" colspan="22" ><div align="center"> <hr color=\'lightblue\'> </div></td> <td> </td> </tr><div align="center"> <?php } while ($row_rsReport = mysql_fetch_assoc($rsReport)); ?> <tr> <td nowrap> </td> <td height="0" colspan="22" > <div align="center"> <?php # variable declaration $prev_rsReport = "« previous"; $next_rsReport = "next »"; $separator = " - "; $max_links = 20; $pages_navigation_rsReport = buildNavigation($pageNum_rsReport,$totalPages_rsReport,$prev_rsReport,$next_rsReport,$separator,$max_links,true); print $pages_navigation_rsReport[0]; ?> <?php print $pages_navigation_rsReport[1]; ?> <?php print $pages_navigation_rsReport[2]; ?> </div></td> <td> </td> </tr> </table> <!-- InstanceEndEditable --> <p> </p> </body> <!-- InstanceEnd --></html> <?php mysql_free_result($rsReport); ?> Now the mdbedit.php.. sorry about the code <?php // at the top of mdbedit.php if ( !isset($_GET[\'username\']) ) { exit; } if ( $_GET[\'username\'] != $_SESSION[\'username\'] ) { exit; } ?> <?php require_once(\'../Connections/connMDB.php\'); ?> <?php function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; switch ($theType) { case "text": $theValue = ($theValue != "") ? "\'" . $theValue . "\'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "\'" . doubleval($theValue) . "\'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "\'" . $theValue . "\'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } $editFormAction = $HTTP_SERVER_VARS[\'PHP_SELF\']; if (isset($HTTP_SERVER_VARS[\'QUERY_STRING\'])) { $editFormAction .= "?" . $HTTP_SERVER_VARS[\'QUERY_STRING\']; } if ((isset($HTTP_POST_VARS["MM_update"])) && ($HTTP_POST_VARS["MM_update"] == "updateForm")) { $updateSQL = sprintf("UPDATE mdbTable SET AlbumCatalogNumber=%s, AlbumArtist=%s, AlbumName=%s, Genre=%s, AlbumLabel=%s, AlbumYearReleased=%s, Type=%s, AlbumTracks=%s, AlbumCountry=%s, AlbumCondition=%s, AlbumPrice=%s, AlbumNotes=%s, AlbumQty=%s, AlbumCoverURL=%s, AlbumCoverThumbnailURL=%s WHERE AlbumID=%s", GetSQLValueString($HTTP_POST_VARS[\'AlbumCatalogNumber\'], "text"), GetSQLValueString($HTTP_POST_VARS[\'AlbumArtist\'], "text"), GetSQLValueString($HTTP_POST_VARS[\'AlbumName\'], "text"), GetSQLValueString($HTTP_POST_VARS[\'selectGenre\'], "text"), GetSQLValueString($HTTP_POST_VARS[\'AlbumLabel\'], "text"), GetSQLValueString($HTTP_POST_VARS[\'AlbumYearReleased\'], "text"), GetSQLValueString($HTTP_POST_VARS[\'selectType\'], "text"), GetSQLValueString($HTTP_POST_VARS[\'AlbumTracks\'], "text"), GetSQLValueString($HTTP_POST_VARS[\'AlbumCountry\'], "text"), GetSQLValueString($HTTP_POST_VARS[\'AlbumCondition\'], "text"), GetSQLValueString($HTTP_POST_VARS[\'AlbumPrice\'], "text"), GetSQLValueString($HTTP_POST_VARS[\'AlbumNotes\'], "text"), GetSQLValueString($HTTP_POST_VARS[\'AlbumQty\'], "int"), GetSQLValueString($HTTP_POST_VARS[\'AlbumCoverURL\'], "text"), GetSQLValueString($HTTP_POST_VARS[\'AlbumCoverThumbnailURL\'], "text"), GetSQLValueString($HTTP_POST_VARS[\'AlbumID\'], "int")); mysql_select_db($database_connMDB, $connMDB); $Result1 = mysql_query($updateSQL, $connMDB) or die(mysql_error()); $updateGoTo = "report.php"; if (isset($HTTP_SERVER_VARS[\'QUERY_STRING\'])) { $updateGoTo .= (strpos($updateGoTo, \'?\')) ? "&" : "?"; $updateGoTo .= $HTTP_SERVER_VARS[\'QUERY_STRING\']; } header(sprintf("Location: %s", $updateGoTo)); } $colname_rsUpdate = "1"; if (isset($HTTP_GET_VARS[\'AlbumID\'])) { $colname_rsUpdate = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS[\'AlbumID\'] : addslashes($HTTP_GET_VARS[\'AlbumID\']); } mysql_select_db($database_connMDB, $connMDB); $query_rsUpdate = sprintf("SELECT * FROM mdbTable WHERE AlbumID = %s", $colname_rsUpdate); $rsUpdate = mysql_query($query_rsUpdate, $connMDB) or die(mysql_error()); $row_rsUpdate = mysql_fetch_assoc($rsUpdate); $totalRows_rsUpdate = mysql_num_rows($rsUpdate); mysql_select_db($database_connMDB, $connMDB); $query_rsGenre = "SELECT * FROM mdbGenre"; $rsGenre = mysql_query($query_rsGenre, $connMDB) or die(mysql_error()); $row_rsGenre = mysql_fetch_assoc($rsGenre); $totalRows_rsGenre = mysql_num_rows($rsGenre); mysql_select_db($database_connMDB, $connMDB); $query_rsType = "SELECT * FROM mdbType"; $rsType = mysql_query($query_rsType, $connMDB) or die(mysql_error()); $row_rsType = mysql_fetch_assoc($rsType); $totalRows_rsType = mysql_num_rows($rsType); ?> <html><!-- InstanceBegin template="/Templates/ICI_Template.dwt" codeOutsideHTMLIsLocked="false" --><head> <!-- <link rel="shortcut icon" href="favicon.ico" /> --> <!-- InstanceBeginEditable name="doctitle" --> <title>iCollectIt</title> <!-- InstanceEndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <!-- InstanceBeginEditable name="head" --> <!-- InstanceEndEditable --> </head> <body topmargin="2"> <table width="95%" border="0"> <tr> <td width="247" height="62" valign="top"><img src="../Logos/ICI-Banner.gif" width="243" height="56"></td> <td width="527" align="left" valign="middle" nowrap> <blockquote> <p><font color="#0099CC" size="6" face="Arial, Helvetica, sans-serif"><strong>Rare and Collectable <br> CD\'s, DVD\'s and Vinyl\'s</strong></font></p> </blockquote></td> <td width="11"> </td> </tr> <tr> <td height="3" colspan="2" valign="top" bgcolor="#006699"></td> <td> </td> </tr> <tr> <td height="18" colspan="2" valign="top"> <div align="center"><em><font color="#CCCCCC" size="5" face="Arial, Helvetica, sans-serif"><strong>. . . . make us an offer we can\'t refuse</strong></font></em></div></td> <td> </td> </tr> </table> <!-- InstanceBeginEditable name="Body" --> <table width="97%" border="0" align="center"> <tr> <td colspan="7"> <form action="<?php echo $editFormAction; ?>" method="post" name="updateForm" id="updateForm"> <div align="center"> <table width="398" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td bgcolor="#CCCCCC"> <table width="100%" border="0" cellspacing="1" cellpadding="2"> <tr bgcolor="#CCCCCC"> <td align="left" bgcolor="#ffe566"><div align="center"><b><font face="Arial" size="2"><b> U p d a t e / E d i t I t e m </b></font></b></div></td> </tr> <tr> <td valign="top" bgcolor="#FFFFFF"> <div align="center"> <table align="center"> <tr valign="baseline"> <td width="117" align="right" nowrap bgcolor="#999999"><font color="#CCCCCC" size="2" face="Arial, Helvetica, sans-serif">Item ID:</font></td> <td width="240" bgcolor="#999999"><font color="#CCCCCC" size="2" face="Arial, Helvetica, sans-serif"> <?php echo $row_rsUpdate[\'AlbumID\']; ?></font></td> </tr> <tr valign="baseline" bgcolor="#CCCCCC"> <td height="17" align="right" nowrap><font color="#999999" size="2" face="Arial, Helvetica, sans-serif">User Name:</font></td> <td> <font color="#999999" size="2" face="Arial, Helvetica, sans-serif"> <?php echo $row_rsUpdate[\'username\']; ?></font></td> </tr> <tr valign="baseline" bgcolor="#FFFFEC"> <td align="right" nowrap><font size="2" face="Arial, Helvetica, sans-serif">Catalog Number:</font></td> <td><font size="2" face="Arial, Helvetica, sans-serif"> <input type="text" name="AlbumCatalogNumber" value="<?php echo $row_rsUpdate[\'AlbumCatalogNumber\']; ?>" size="32"> </font></td> </tr> <tr valign="baseline" bgcolor="#FFFFEC"> <td align="right" nowrap><font size="2" face="Arial, Helvetica, sans-serif">Item Artist:</font></td> <td><font size="2" face="Arial, Helvetica, sans-serif"> <input type="text" name="AlbumArtist" value="<?php echo $row_rsUpdate[\'AlbumArtist\']; ?>" size="32"> </font></td> </tr> <tr valign="baseline" bgcolor="#FFFFEC"> <td align="right" nowrap><font size="2" face="Arial, Helvetica, sans-serif">Item Name:</font></td> <td><font size="2" face="Arial, Helvetica, sans-serif"> <input type="text" name="AlbumName" value="<?php echo $row_rsUpdate[\'AlbumName\']; ?>" size="32"> </font></td> </tr> <tr valign="baseline" bgcolor="#FFFFEC"> <td align="right" nowrap><font size="2" face="Arial, Helvetica, sans-serif">Genre:</font></td> <td> <font size="2" face="Arial, Helvetica, sans-serif"> <select name="selectGenre" id="select"> <?php do { ?> <option value="<?php echo $row_rsGenre[\'Genre\']?>"<?php if (!(strcmp($row_rsGenre[\'Genre\'], $row_rsUpdate[\'Genre\']))) {echo "SELECTED";} ?>><?php echo $row_rsGenre[\'Genre\']?></option> <?php } while ($row_rsGenre = mysql_fetch_assoc($rsGenre)); $rows = mysql_num_rows($rsGenre); if($rows > 0) { mysql_data_seek($rsGenre, 0); $row_rsGenre = mysql_fetch_assoc($rsGenre); } ?> </select> </font></td> </tr> <tr valign="baseline" bgcolor="#FFFFEC"> <td align="right" nowrap><font size="2" face="Arial, Helvetica, sans-serif">Item Label:</font></td> <td><font size="2" face="Arial, Helvetica, sans-serif"> <input type="text" name="AlbumLabel" value="<?php echo $row_rsUpdate[\'AlbumLabel\']; ?>" size="32"> </font></td> </tr> <tr valign="baseline" bgcolor="#FFFFEC"> <td align="right" nowrap><font size="2" face="Arial, Helvetica, sans-serif">Year Released:</font></td> <td><font size="2" face="Arial, Helvetica, sans-serif"> <input type="text" name="AlbumYearReleased" value="<?php echo $row_rsUpdate[\'AlbumYearReleased\']; ?>" size="10"> </font></td> </tr> <tr valign="baseline" bgcolor="#FFFFEC"> <td align="right" nowrap><font size="2" face="Arial, Helvetica, sans-serif">Type:</font></td> <td><font size="2" face="Arial, Helvetica, sans-serif"> <select name="selectType" id="select2"> <?php do { ?> <option value="<?php echo $row_rsType[\'Type\']?>"<?php if (!(strcmp($row_rsType[\'Type\'], $row_rsUpdate[\'Type\']))) {echo "SELECTED";} ?>><?php echo $row_rsType[\'Type\']?></option> <?php } while ($row_rsType = mysql_fetch_assoc($rsType)); $rows = mysql_num_rows($rsType); if($rows > 0) { mysql_data_seek($rsType, 0); $row_rsType = mysql_fetch_assoc($rsType); } ?> </select> </font></td> </tr> <tr valign="baseline" bgcolor="#FFFFEC"> <td align="right" nowrap><font size="2" face="Arial, Helvetica, sans-serif">Tracks:</font></td> <td><font size="2" face="Arial, Helvetica, sans-serif"> <input type="text" name="AlbumTracks" value="<?php echo $row_rsUpdate[\'AlbumTracks\']; ?>" size="2"> </font></td> </tr> <tr valign="baseline" bgcolor="#FFFFEC"> <td align="right" nowrap><font size="2" face="Arial, Helvetica, sans-serif"> Country of Origin:</font></td> <td><font size="2" face="Arial, Helvetica, sans-serif"> <input type="text" name="AlbumCountry" value="<?php echo $row_rsUpdate[\'AlbumCountry\']; ?>" size="32"> </font></td> </tr> <tr valign="baseline" bgcolor="#FFFFEC"> <td align="right" nowrap><font size="2" face="Arial, Helvetica, sans-serif">Condition:</font></td> <td><font size="2" face="Arial, Helvetica, sans-serif"> <input type="text" name="AlbumCondition" value="<?php echo $row_rsUpdate[\'AlbumCondition\']; ?>" size="32"> </font></td> </tr> <tr valign="baseline" bgcolor="#FFFFEC"> <td align="right" nowrap><font size="2" face="Arial, Helvetica, sans-serif">Price:</font></td> <td><font size="2" face="Arial, Helvetica, sans-serif"> <input type="text" name="AlbumPrice" value="<?php echo $row_rsUpdate[\'AlbumPrice\']; ?>" size="32"> </font></td> </tr> <tr valign="baseline" bgcolor="#FFFFEC"> <td align="right" nowrap><font size="2" face="Arial, Helvetica, sans-serif">Item Notes:</font></td> <td><font size="2" face="Arial, Helvetica, sans-serif"> <textarea name="AlbumNotes" cols="32"><?php echo $row_rsUpdate[\'AlbumNotes\']; ?></textarea> </font></td> </tr> <tr valign="baseline" bgcolor="#FFFFEC"> <td align="right" nowrap><font size="2" face="Arial, Helvetica, sans-serif">Qty:</font></td> <td><font size="2" face="Arial, Helvetica, sans-serif"> <input type="text" name="AlbumQty" value="<?php echo $row_rsUpdate[\'AlbumQty\']; ?>" size="2"> </font></td> </tr> <tr valign="baseline" bgcolor="#FFFFEC"> <td align="right" nowrap><font size="2" face="Arial, Helvetica, sans-serif">Item Image URL:</font></td> <td><font size="2" face="Arial, Helvetica, sans-serif"> <input type="text" name="AlbumCoverURL" value="<?php echo $row_rsUpdate[\'AlbumCoverURL\']; ?>" size="32"> </font></td> </tr> <tr valign="baseline" bgcolor="#FFFFEC"> <td align="right" nowrap><font size="2" face="Arial, Helvetica, sans-serif">Item Thumbnail URL:</font></td> <td><font size="2" face="Arial, Helvetica, sans-serif"> <input type="text" name="AlbumCoverThumbnailURL" value="<?php echo $row_rsUpdate[\'AlbumCoverThumbnailURL\']; ?>" size="32"> </font></td> </tr> <tr valign="baseline" bgcolor="#FFFFEC"> <td align="right" nowrap><font size="2" face="Arial, Helvetica, sans-serif"> </font></td> <td><font size="2" face="Arial, Helvetica, sans-serif"> <input type="reset" name="Reset" value="Undo Changes"> <input name="submit" type="submit" value="Update Item"> </font></td> </tr> &nbs
  17. Recently I\'ve received further suggestions to my problem. Although I would not know how to implement these since I am a newby, they might give you alternative ideas. Here they are - ..and
  18. Thanks for looking in to this. Now I get a blank page. If any helps for your info - \'edit\' URL link has a URL parameter in the page called report.php which then calls mdbedit.php page (which now has your new code at the top of the page) mdbedit.php?AlbumID=<?php echo $row_rsReport[\'AlbumID\']; ?>&username=<?php echo $HTTP_SESSION_VARS[\'username\']; ?> I have also tried without success mdbedit.php?AlbumID=<?php echo $row_rsReport[\'AlbumID\']; ?>
  19. Thanks but had no affect. Code is now there to use. URL http://www.oavs.com.au/membership/mdbedit....D=171&jack=jack can be change easly changed to this amd record can be seen and edited. URLhttp://www.oavs.com.au/membership/mdbedit.php?AlbumID=174&jack=jack Interestingly AlbumID=174 belongs to fred NOT jack but it still correctly displays it. I\'ve noticed you suggested $_GET[\'username\' , all my codes has POST. and I my server is MySQL 3.23.56 version with Php 4.3.2
  20. Hi, I have a similar problem like earlier posted by \'deki\'. Displaying ediable page as per current user (by sessions) is fine. There is a menu items where user lists his total records. On that total record display page, there is a edit link per items listed. When you click the \'edit\' link takes you to update record page. Update page is shared by multi level users. Such as Members and Admin depending on thier initial login level stage. Problem is on the top of the Update page - browsers URL it has http://www.oavs.com.au/membership/mdbedit....2&username=jack. Now any one can go and change the AlbumId=value on the URL to any value to access other user\'s records even without even removing the rest of the stuff &username=jack AND EDIT !! This is sll I want is, when the member logs on and starts editing he /she can not edit any records but his/hers even if they change the URL . Anotherwords : logged user must be current user equal to the session user who can only access to current user records in the mysql. How can you do this? can someone please help? Here is the code for the \'edit\' link- <?php do { ?> <tr> <td nowrap> </td> <td ><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td> <td bgcolor="#EAFEFF"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong> <a href="mdbedit.php?AlbumID=<?php echo $row_rsReport[\'AlbumID\']; ?>&username=<?php echo $row_rsReport[\'username\']; ?>">Edit</a></strong></font></td> <td bgcolor=""><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td> <td bgcolor="#FBFDEC"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_rsReport[\'username\']; ?></font></td>
  21. OK I found the problem to my previous mysql installation. I installed self installation version that insatalls Mysql/PHP and the Apache. This was causing all the problem. I went and stoped Mysql and then re installed (not much of a installation, basicly copied the files from a zip folder to c:/mysql) the manual version. So installing (copying) mysql-4.1.0-alphafixed the problem. All this time I wasted your time. Sorry guys :oops: . But I did not know. Now I got it working :roll: what do I do with it ..no seriously. How can I use it with my DW MX so that all the tests with my mysql and PHP actually works locally before any uploads. Does that mean I have to change all my mysql host in my php files need to be changed? aghhh! must be an other way. Would be easier to just change the connection.php file then re change it just before up load. I am asking because I do not know which is the right/correct/ common way. Any suggestions please :shock: Thanks
  22. OK I found the problem. I installed self installation version that insatalls Mysql/PHP and the Apache. This was causing all the problem. I went and stoped Mysql and then re installed (not much of a installation, basicly copied the files from a zip folder to c:/mysql) the manual version. So installing (copying) mysql-4.1.0-alphafixed the problem. All this time I wasted your time. Sorry guys. But I did not know. Now I got it working :-)) what do I do with it ..no seriously. How can I use it with my DW MX so that all the tests with my mysql and PHP actually works locally before any uploads. Does that mean I have to change all my mysql host in my php files need to be changed? aghhh! must be an other way. Would be easier to just change the connection.php file then re change it just before up load. I am asking because I do not know which is the right/correct/ common way. Any suggestions plase ? Thanks
×
×
  • 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.