topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • April 20, 2018, 03:48 AM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - kevstero [ switch to compact view ]

Pages: [1]
1
Developer's Corner / Re: shopping cart for php/mysql
« on: July 17, 2008, 10:25 PM »
I would say either Magento:
http://www.magentocommerce.com/

or Zen Cart:
http://www.zen-cart.com/

thank you sir

2
Developer's Corner / shopping cart for php/mysql
« on: July 14, 2008, 06:54 PM »
Hi,

Just wanted to get your opinions on what type of shopping cart package I should use for my mysql/php site, also built with dreamweaver.. Any info would help..

3
Developer's Corner / Re: making drop down menu wider
« on: July 13, 2008, 07:08 PM »
style="width: 100px" did the trick..

4
Developer's Corner / making drop down menu wider
« on: July 13, 2008, 12:24 PM »
Hi,

I made some drop down menus and want to make them wider.. simply inserting width="100" doesn't work.. any idea how I can make this menu longer in width? Thanks.


<select wdg:subtype="DependentDropdown" name="select1" id="select1" wdg:type="widget" wdg:recordset="Recordset4" wdg:displayfield="SubName" wdg:valuefield="SubId" wdg:fkey="CatId" wdg:triggerobject="select">
    </select>

5
Developer's Corner / Re: unexpected T_STRING
« on: July 12, 2008, 11:36 PM »
problem solved, unnecessary space between row_ and recordset

6
Developer's Corner / unexpected T_STRING
« on: July 12, 2008, 10:56 PM »
Hi,
Somethings wrong with this line of code.. any idea what? I'm directing the variable "recordID" to the "deletethree.php" page using the "ItemNum" column in the field..

<a href="deletethree.php?recordID=<?php echo $row_ recordset1 ['ItemNum']; ?>">Delete</a>

7
problem solved, simply moved images to the main directory.. obviously i need to add the path myself..

8
Developer's Corner / images dont display when posted with form
« on: July 04, 2008, 05:56 PM »
Hi,

My php form, using a "file" input, seems to only store the image name in the database. I thought that by changing the file type, it would upload the full filename, however I don't know which file type to use other than "text".

When I display the table data, if the intended file was localhost\antiques\images\image1.jpg all that will show is the text "image1". So hopefully when this problem of uploading the full filepath is corrected, will the images begin to show?

Thanks!

9
Developer's Corner / Re: Use a foreach loop maybe?
« on: June 28, 2008, 10:23 PM »
your for part is no good.

you could simply do a check INSIDE your do while loop (which incidentally should probably be a while do loop)
and say
if ($row_Recordset1['SubId'] != $Test) continue;

OR you coud modify the mysql so that it only fetched rows with that setting.


Mouser, you're the man.. Your if statement worked like a charm.. For anybody who uses this as a reference, this is what worked:

<?php do { ?>
    <tr>
<?PHP if ($row_Recordset1['SubId'] != $Selection) continue; ?>
      <td><?php echo $row_Recordset1['SubId']; ?></td>
      <td><?php echo $row_Recordset1['CatId']; ?></td>
      <td><?php echo $row_Recordset1['SubName']; ?></td>
    </tr>
    <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>

10
Developer's Corner / Re: Use a foreach loop maybe?
« on: June 28, 2008, 08:30 AM »
Thanks guys..

I couldn't get anything to work at all by using your code.. The foreach loop just wasn't working.. With this code, I was however able to still get my headers displayed, only no content goes into the table.. The variable $Test does have a value, so it should list something in that table.. Any idea what's wrong? I'm guessing the only relevant code to look at is at the bottom of this. Dreamweaver puts in a lot of stuff..


Code: PHP [Select]
  1. <?php require_once('Connections/antiques.php');
  2. $Test = $_POST['select2'];
  3. ?>
  4. <?php
  5. if (!function_exists("GetSQLValueString")) {
  6. function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  7. {
  8.   $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  9.  
  10.   $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  11.  
  12.   switch ($theType) {
  13.     case "text":
  14.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  15.       break;    
  16.     case "long":
  17.     case "int":
  18.       $theValue = ($theValue != "") ? intval($theValue) : "NULL";
  19.       break;
  20.     case "double":
  21.       $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
  22.       break;
  23.     case "date":
  24.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  25.       break;
  26.     case "defined":
  27.       $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  28.       break;
  29.   }
  30.   return $theValue;
  31. }
  32. }
  33.  
  34. mysql_select_db($database_antiques, $antiques);
  35. $query_Recordset1 = "SELECT * FROM itemsubcategory";
  36. $Recordset1 = mysql_query($query_Recordset1, $antiques) or die(mysql_error());
  37. $row_Recordset1 = mysql_fetch_assoc($Recordset1);
  38. $totalRows_Recordset1 = mysql_num_rows($Recordset1);
  39. ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  40. <html xmlns="http://www.w3.org/1999/xhtml">
  41. <head>
  42. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  43. <title>Untitled Document</title>
  44. </head>
  45.  
  46. <body>
  47. <table border="1" cellpadding="0" cellspacing="0">
  48.   <tr>
  49.     <td>SubId</td>
  50.     <td>CatId</td>
  51.     <td>SubName</td>
  52.   </tr>
  53.   <?php      
  54.            do { if ($row_Recordset1['SubId'] != $test) continue;
  55.   ?>
  56.     <tr>
  57.       <td><?php echo $row_Recordset1['SubId']; ?></td>
  58.       <td><?php echo $row_Recordset1['CatId']; ?></td>
  59.       <td><?php echo $row_Recordset1['SubName']; ?></td>
  60.     </tr>
  61.     <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
  62. </table>
  63. </body>
  64. </html>
  65. <?php
  66. mysql_free_result($Recordset1);
  67. ?>

11
Developer's Corner / Re: Use a foreach loop maybe?
« on: June 27, 2008, 11:36 PM »
What's wrong with this code? 


<?php for ($row_Recordset1['SubId'] = $Test);
do { ?>
    <tr>
      <td><?php echo $row_Recordset1['SubId']; ?></td>
      <td><?php echo $row_Recordset1['CatId']; ?></td>
      <td><?php echo $row_Recordset1['SubName']; ?></td>
    </tr>
    <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>

12
Developer's Corner / Use a foreach loop maybe?
« on: June 27, 2008, 10:32 PM »
I want my table to only list the fields that have the same SubId as the one chosen in the dropdown menu by the user. Lets call this variable $Test.

How can I only show the fields in this table where SubId = $Test?
Maybe a foreach loop? Somebody care to help?



<table border="1" cellpadding="0" cellspacing="0">
  <tr>
    <td>SubId</td>
    <td>CatId</td>
    <td>SubName</td>
  </tr>
  <?php do { ?>
    <tr>
      <td><?php echo $row_Recordset1['SubId']; ?></td>
      <td><?php echo $row_Recordset1['CatId']; ?></td>
      <td><?php echo $row_Recordset1['SubName']; ?></td>
    </tr>
    <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>

13
Developer's Corner / Re: Dreamweaver, dynamic drop down menu
« on: June 27, 2008, 11:00 AM »
I got the drop down menus working because I got dreamweaver developer toolbox...

Now I just need to send me results form the second drop down menu to another page after the user clicks submit..

It's no problem to send the actual SubID to be displayed (the value for the item chosen in the second drop down menu), but I want to display all fields with that same SubID, along with their corresponding fields.. Does that make sense?

If anybody could help give an idea as how to go about doing this, I'd appreciate it.. Maybe even pay $$

14
Developer's Corner / Re: Dreamweaver, dynamic drop down menu
« on: June 26, 2008, 01:47 PM »
Please, somebody.....

15
Post New Requests Here / IDEA: dynamic drop down menu
« on: June 26, 2008, 01:45 PM »
Hi. Here's my problem.

I have two tables. One is a main category table and the other is a subcategory table.

The main category table has the fields (catID and catName)

The Subcategory table has the fields (catId, SubId and SubName)

The two are related via the catId field..

I can't figure out how to dynamically load the second drop down menu from the choice made in the first drop down menu.. If anybody can point out whats wrong or develop something similar, it would be nice... Thanks.


<?php require_once('Connections/antiques.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($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;
}
}

mysql_select_db($database_antiques, $antiques);
$query_Recordset1 = "SELECT * FROM itemmastercategory";
$Recordset1 = mysql_query($query_Recordset1, $antiques) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);

mysql_select_db($database_antiques, $antiques);
$query_Recordset2 = "SELECT * FROM itemmastercategory";
$Recordset2 = mysql_query($query_Recordset2, $antiques) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...ml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
<label>
<select name="select" id="select">
<option value="">Choose Antique Category</option>
<?php
do {
?>
<option value="<?php echo $row_Recordset1['CatId']?>"><?php echo $row_Recordset1['CatName']?></option>
<?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
$rows = mysql_num_rows($Recordset1);
if($rows > 0) {
mysql_data_seek($Recordset1, 0);
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
}
?>
</select>
</label>
<label>
<select name="select2" id="select2">
<option value="">Choose Antique Sub Category</option>
<?php
do {
?><option value="<?php echo $row_Recordset2['SubId']?>"><?php echo $row_Recordset2['SubName']?></option>
<?php
} while ($row_Recordset2 = mysql_fetch_assoc($Recordset2));
$rows = mysql_num_rows($Recordset2);
if($rows > 0) {
mysql_data_seek($Recordset2, 0);
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
}
?>
</select>
</label>
</form>
</body>
</html>
<?php
mysql_free_result($Recordset1);

mysql_free_result($Recordset2);
?>

16
Developer's Corner / Dreamweaver, dynamic drop down menu
« on: June 24, 2008, 10:30 PM »
Hi. Here's my problem.

I have two tables. One is a main category table and the other is a subcategory table.

The main category table has the fields (catID and catName)

The Subcategory table has the fields (catId, SubId and SubName)

The two are related via the catId field..

I can't figure out how to dynamically load the second drop down menu from the choice made in the first drop down menu.. If anybody can point out whats wrong, it would be nice Thanks.




<?php require_once('Connections/antiques.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($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;
}
}

mysql_select_db($database_antiques, $antiques);
$query_Recordset1 = "SELECT items.ItemId, items.BuyingPrice, items.SellingPrice FROM items";
$Recordset1 = mysql_query($query_Recordset1, $antiques) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...ml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <label></label>
  <select name="choosemenu" id="choosemenu" title="<?php echo $_POST['ChooseMenu']; ?>" onchange="MM_jumpMenu('parent',this,0)">
    <option value="">Choose Antique Type</option>
    <?php
do { 
?>
    <option value="<?php echo $row_Recordset1['ItemId']?>"><?php echo $row_Recordset1['ItemId']?></option>
    <?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
  $rows = mysql_num_rows($Recordset1);
  if($rows > 0) {
      mysql_data_seek($Recordset1, 0);
     $row_Recordset1 = mysql_fetch_assoc($Recordset1);
  }
?>
          </select>
  <label>
  <input type="submit" name="Submit" id="Submit" value="Submit" />
</label>
</form>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>

Pages: [1]