sallecpt 0 Junior Poster in Training

Hey there

I know one can use include http://domain/page.php?var1=xxx&var2=xxx

But I dont need an include

This is what I need to do, and how on earth can I achieve this? I've burnt my brains already.

Please help me.

$command = "/usr/bin/php5 -f /home/path/to/file/test.php?folder=777";

then run the command.

so,
test.php needs to know the folder code.

is there a way to do this, or maybe a suggestion for something else?

I cant do an include, have to do it by executing a command.

thanx

sallecpt 0 Junior Poster in Training

HI there

Could someone PLEASE help me;

I have a drop-down menu on my site and when I hover, the drop-down goes behind the content.

This is the address : www.beds24.co.za

I dont know how to fix this, I've tried so many different settings.

This is my CSS file.

The menu in question is /* 2nd Menu */

/* Root = Horizontal, Secondary = Vertical */
ul#dsm {
  margin: 0;
  border: 0 none;
  padding: 0 0 0 10px;
  width: 956px; /*For KHTML*/
  list-style: none;
  height: 28px;

}

ul#dsm li {
  margin: 0;
  border: 0 none;
  padding: 0;
  float: left; /*For Gecko*/
  display: inline;
  list-style: none;
  position: relative;
  width:auto;
 /* height: 28px;*/

}

ul#dsm ul {
  margin: 0;
  border: 0 none;
  padding: 0;
  width: 160px;
  list-style: none;
  display: none;
  position: absolute;
  top: 36px;
  left: 0;

}

ul#dsm ul:after /*From IE 7 lack of compliance*/{
  clear: both;
  display: block;
  font: 1px/0px serif;
  content: ".";
  height: 0;
  visibility: hidden;
}

ul#dsm ul li {
  width: 160px;
  float: left; /*For IE 7 lack of compliance*/
  display: block !important;
  display: inline; /*For IE*/
   
}

/* Root Menu */
ul#dsm a {
 border-right: 1px dotted #92ABBF;
 border-left: 1px dotted #92ABBF;
 /* border: 1px solid #356AA0;
  
  border-bottom-color: #356AA0;*/
  padding: 0 17px 0 17px;
  float: none !important; /*For Opera*/
  float: left; /*For IE*/
  display: block;
  /*background: #356AA0;*/
  color:#333333;
  font: bold 16px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
  text-decoration: none;
  height: auto !important;
  height: 1%; /*For IE*/
  line-height:36px; width:auto;
}

/* …
sallecpt 0 Junior Poster in Training

HI there

Could someone PLEASE help me;

I have a drop-down menu on my site and when I hover, the drop-down goes behind the content.

This is the address : www.beds24.co.za

I dont know how to fix this, I've tried so many different settings.

This is my CSS file.

The menu in question is /* 2nd Menu */

/* Root = Horizontal, Secondary = Vertical */
ul#dsm {
  margin: 0;
  border: 0 none;
  padding: 0 0 0 10px;
  width: 956px; /*For KHTML*/
  list-style: none;
  height: 28px;

}

ul#dsm li {
  margin: 0;
  border: 0 none;
  padding: 0;
  float: left; /*For Gecko*/
  display: inline;
  list-style: none;
  position: relative;
  width:auto;
 /* height: 28px;*/

}

ul#dsm ul {
  margin: 0;
  border: 0 none;
  padding: 0;
  width: 160px;
  list-style: none;
  display: none;
  position: absolute;
  top: 36px;
  left: 0;

}

ul#dsm ul:after /*From IE 7 lack of compliance*/{
  clear: both;
  display: block;
  font: 1px/0px serif;
  content: ".";
  height: 0;
  visibility: hidden;
}

ul#dsm ul li {
  width: 160px;
  float: left; /*For IE 7 lack of compliance*/
  display: block !important;
  display: inline; /*For IE*/
   
}

/* Root Menu */
ul#dsm a {
 border-right: 1px dotted #92ABBF;
 border-left: 1px dotted #92ABBF;
 /* border: 1px solid #356AA0;
  
  border-bottom-color: #356AA0;*/
  padding: 0 17px 0 17px;
  float: none !important; /*For Opera*/
  float: left; /*For IE*/
  display: block;
  /*background: #356AA0;*/
  color:#333333;
  font: bold 16px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
  text-decoration: none;
  height: auto !important;
  height: 1%; /*For IE*/
  line-height:36px; width:auto;
} …
sallecpt 0 Junior Poster in Training

thanx @ mschroeder

sallecpt 0 Junior Poster in Training

ditto @ Zagga

sallecpt 0 Junior Poster in Training

meant *ARE YOUR IMAGE FILENAMES....

sallecpt 0 Junior Poster in Training

thanx man.

in regards with the other post, no its not.

I am submitting plain text, and I just want to know how to alter the ereg syntax so that it will allow the /n/r tags too.

I got it working in javascript, but I dong get the solution for php validation.

Thanx.

sallecpt 0 Junior Poster in Training

it all depends how you want to do it.

Are you image filenames listed in a database? Do you want to display random images directly from a folder? Do you want to use javascript...?

Let us know

sallecpt 0 Junior Poster in Training

just remember one thing, lets say you strip the tags after the first 15 characters. And if you dont strip the tags, the html code will count as characters. Secondly, if, lets say, your sting is "bold" and you use substr before the tag is closed, everything else will be bold.

For example, if you used italic, and if you use substr for the first 5 characters, this would be the result

<i>Hello. My name is peter. How are you today</i>

The result will turn like this :
Hello. My name is
AND THE REST OF YOUR PAGE WILL BE ITALIC TOOOOOOO!!!!!

and all the text below that, will be italic too. So unless you are for sure that the formatting tags will be closed before the substr, it might be good advice NOT to use formatting in your first "50" characters.

Understand what I am trying to tell you?

sallecpt 0 Junior Poster in Training

then use substr only. then the formatting will stay in place. Dont strip the tags

and here is some basic substr info for reference use.

<?php
echo substr('abcdef', 1);     // bcdef
echo substr('abcdef', 1, 3);  // bcd
echo substr('abcdef', 0, 4);  // abcd
echo substr('abcdef', 0, 8);  // abcdef
echo substr('abcdef', -1, 1); // f

// Accessing single characters in a string
// can also be achieved using "square brackets"
$string = 'abcdef';
echo $string[0];                 // a
echo $string[3];                 // d
echo $string[strlen($string)-1]; // f

?>
sallecpt 0 Junior Poster in Training

hey all.

I am trying to do validation via PHP for submitted forms. Below is my own code, please comment if its the correct method or not.

However, I tried so many ways to have the /n or /r added, but I cant get to it.

Its just to make a new paragraph. Currently, it does the validation, but once I hit the enter key twice, for a new paragraph, it doesnt work the way it should.

Any help and advice appreciated.

Thanx

function validateText($data){
		//if it's NOT valid
		if(ereg('[^a-zA-Z0-9 .,-_]', $data))
			return false;
		//if it's valid - Must contain only alphabetical characters a-z, numerical numbers 0-9, spaces, commas, fullstops, dashes and underscores (abc123 ,._-)
		else
			return true;
}
sallecpt 0 Junior Poster in Training

categories are created from the admin section that I wrote. so i need a dynamic solution, not static ;-( Appreciate any help

sallecpt 0 Junior Poster in Training

yup.

sallecpt 0 Junior Poster in Training

i get the idea.

thanx a lot. I'll try it and let you know tomorrow morning.

midnight where I am :-(

thanx again

sallecpt 0 Junior Poster in Training

hey. Thanx.

I'll really appreciate it.

I'm trying to "repeat" tables, instead of <tr><td>data</td></tr>

Basically displaying x amount of tables side by side, but I dont get my head around it.

Thanx for getting back to me.

sallecpt 0 Junior Poster in Training

the first image is what I have, the second image is what I want to achieve.

below is my code.

its basically displaying mysql data in columns. but I need to get rid of that huge gab.

<?php
if (!function_exists("GetSQLValueString")) { require_once ($FolderFunctions.'getvaluestring.php'); } 
mysql_select_db($database_classi, $classi);
$query_docategories = "SELECT catID, Title, ParentCat, `Description`, `Sort` FROM category WHERE ParentCat = '0' ORDER BY Sort ASC";
$docategories = mysql_query($query_docategories, $classi) or die(mysql_error());
$row_docategories = mysql_fetch_assoc($docategories);
$totalRows_docategories = mysql_num_rows($docategories);
?>
<h1>
	<?php echo $lanClassifiedAds; ?>
</h1>
<div class="homelist">
	<table border="0" width="100%">
		<?php
		//set 3 to 4 of you want 4 columns. Set it to 5 if you want 5, etc
		$numcols = 4; // how many columns to display
		$numcolsprinted = 0; // no of columns so far

		// get the results to be displayed
		mysql_select_db($database_classi, $classi);
		$query = "SELECT * FROM category WHERE ParentCat = '0'";
		$mysql_result = mysql_query($query, $classi);

		// get each row
		while($myrow = mysql_fetch_row($mysql_result))
		{ ?>

			<?php
			$in= $myrow[3].'<br>';

			if ($numcolsprinted == $numcols) {
			print "</tr>\n<tr>\n";
			$numcolsprinted = 0;
		}

		// output row from database
		echo "<td class='valigntop'><div class='homelistbottompad'><div class='homepagecategories'>$in</div>"; ?>

		<?php
		mysql_select_db($database_classi, $classi);
		$query_dosubcategories = "SELECT catID, Title, ParentCat, `Description`, `Sort` FROM category WHERE ParentCat = '".$myrow[0]."' ORDER BY Sort ASC";
		$dosubcategories = mysql_query($query_dosubcategories, $classi) or die(mysql_error());
		$row_dosubcategories = mysql_fetch_assoc($dosubcategories);
		$totalRows_dosubcategories = mysql_num_rows($dosubcategories);
		?>          
		<?php do { ?>
			<div class="subpagecategories">• <a href="<?php echo 'ads-List_'.$row_dosubcategories['catID']; ?>.html" class="list" title="<?php echo $row_dosubcategories['Title']; ?> | <?php echo $row_meta['SiteTitle']; ?> - <?php echo $row_meta['SiteSlogan']; ?>"><?php echo			 $row_dosubcategories['Title']; ?></a> 
			<?php
			mysql_select_db($database_classi, $classi); …
sallecpt 0 Junior Poster in Training

I got this rss generator from phpclasses.com (thinks thats the address)
so all you need to do is use the fwrite command to write to your rss file.

to simplify my description, in short, you need to code a small php script (basic) using fwrite to "duplicate" the example.php file's contents, by writing it to your rss file.

So, what you can do, is create a sql recordset, and every time when someone posts data, use the fwrite command to write the posted data to your rss file.

its not that difficult man.

good luck, hope that I could be of assistance.

sallecpt 0 Junior Poster in Training

yes, it is possible, I have just completed a large web project for someone and to get you starting, I use a cron job to update my rss feed every 15 minutes. Basically, it is php code and a cron job, to write to my rss file.

So, to get you starting, the answer is yes, it is possible

sallecpt 0 Junior Poster in Training

okay, here is what I have, and what I want ;-)

sallecpt 0 Junior Poster in Training

heres a sample of what I'd like, but not the perfect example, but something similar to it.

http://www.gumtree.com/

and @ ardav, thanx man, I'll try that in a sec

sallecpt 0 Junior Poster in Training

hey man, i feel bad for you.

here is a complete solution which I've quickly created in dreamweaver, I should not provide this, I guess, cause we try to learn you something, by compiling solutions for yourself. But here it is.

<?php require_once('Connections/conn_name.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $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_conn_name, $conn_name);
$query_data = "SELECT catID, Title FROM category ORDER BY Title ASC";
$data = mysql_query($query_data, $conn_name) or die(mysql_error());
$row_data = mysql_fetch_assoc($data);
$totalRows_data = mysql_num_rows($data);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <label>Menu
    <select name="menuname" id="menuname">
      <?php
do {  
?>
      <option value="<?php echo $row_data['Title']?>"><?php echo $row_data['Title']?></option>
      <?php
} while ($row_data = mysql_fetch_assoc($data));
  $rows = mysql_num_rows($data);
  if($rows > 0) {
      mysql_data_seek($data, 0);
	  $row_data = mysql_fetch_assoc($data);
  }
?>
    </select>
  </label>
</form>
</body> …
sallecpt 0 Junior Poster in Training

APOLOGIES!!! THATS IS FOR A DHMTL MENU! LOL!!!

But the principle stayts the same, now its even easier.

something like

<select name="xxx" id="xxx">
//PHP CODE HERE
<?php do { ?>
<option value="xxx">xxx</option>
<?php } while xxx = $recordset //this would depend on your sql query!!! ?>
</select>

sallecpt 0 Junior Poster in Training

You can do this

I'll give you the base method, search w3shools.com for the CSS

Using css styling, to create a drop down menu.

<ul>
<li>Option One</li>
<li>Option Two</li>
</ul>

So, search for w3schools.com to create a css style so that the above option would display as a drop down menu.

Then, as you would like to create a repeated region, lets say, to make it simple, in dreamweaver - simply throw the repeated tags around the li part, something like

<ul>
//php code here
<?php do { ?>
<li><a href="http://link-to-file.html"><?php echo $row_recordset; ?></a></li>
<?php } while xxx = $recordset ?>
</ul>

This is very very very easy.

If you dont get it, let me know

sallecpt 0 Junior Poster in Training

okay I see that my post does not display the way I typed it.

Basically, if I have 6 columns dynamically created from mysql, displaying 3 columns in a line, I would like list column 4 almost directly underneath column 1, and column 5 underneath column 2 and so forth. Currently, column 4,5 and 6 displays underneath column 1 , 2 and three, but only in the next line, so if column 1 has 15 entries, and column 2 and 3 only has , lets say, 5 entries, there would be a huge gab between column 2 and 5, as well as between column 3 and 6. Instead, I would like to have the next line of columns directly below the top line's columns. I will try to search for an example.

Thanx a million

sallecpt 0 Junior Poster in Training

First of all, love the purple theme!

If anyone could help me with this. I have read and tried numerous samples from other forums, but all is the same as what I have done.

I am building a small classifieds site for my church.

I wanted to display data in columns. And I have achieved that, BUT, let me scetch a short scenario.

This is what I have achieved :

PETS FOR ADOPTION CARS AND VEHICLES
--> Dogs --> Small Cars
--> Cats --> Big Cars
--> Mice
--> Reptiles
--> Hamsters
--> Monkeys
--> Other Pets

HOUSES TO LET COMMUNITY ASSISTANCE
--> Small Houses --> Old Age Homes
--> Big Houses --> Charity Assistance
--> Tree Houses

Now, look at that huge gab below 'Cars and Vehicles' . In my case, the community column has about 15 entries, and then, the next colunm below that, sits at the end of the page.

Now if there is someone who can help me to achieve the following, I would really really appreciate it

PETS FOR ADOPTION CARS AND VEHICLES
--> Dogs --> Small Cars
--> Cats --> Big Cars
--> Mice
--> Reptiles COMMUNITY ASSISTANCE
--> Hamsters --> Old Age Homes
--> Monkeys --> Charity Assistance
--> Other Pets --> Pet Assistance
--> Other animal assistance
HOUSES TO LET --> Community Projects

sallecpt 0 Junior Poster in Training

forgot to mention; I used GROUP BY to eliminate duplicate entries as a result from the JOIN statement.

sallecpt 0 Junior Poster in Training

No, it is textfields, not checkboxes. Checkboxes acts totally different than to other fields. Managing and extracting data from checkboxes is easy.

However, I got a solution.

Basically, all I wanted is to have a total in regards to how many textboxes contains data, after form submittal. But it is far more complex than I thought. Exactly 15 hours and 48 minutes of constant working, I got it working. I have search the entire net, and no where I could find a proper solution. My only solution was to physically puzzle it out. Change lines of code, move lines, and try every possible count.

Somewhere on a post I ready something about someone who asked about a SQL statement containing "IN (xxx,xxx)" but noboy could give more clarity on that. I also realised that if I want to achieve something that I have never done before (yes I did many checkboxes but as said, thats something totally different) - then I will need to try something that I have never tried before.

All I can say is that it was kinda torture and hard work, but, the end result was worth it. And I am sharing, for if someone would be in the same situation.

Here it is:

foreach ($_POST as $key => $value)
{
if ($value != '')
{
	$finale = count(array_keys($_POST, ""));
}
}
$finalevalue = (count($_POST)-$finale)-2;

I used minus two, because I am not posting the textboxes only, but two other values …

sallecpt 0 Junior Poster in Training

I have got several text boxes in a form. when I post these textboxes, I simply just want to count / have the total of how many textboxes contains data OR how many was elft empty. thats it...

sallecpt 0 Junior Poster in Training

hey guys.

okay, I know how to count form values.

something like;

<?php echo count($_POST; ?> where the field would be something like field

however, I am cracking my head to get a solution to count, but only where the field has a value.

Please, someone, help me with this ;-)

I tried !isset($_POST) but it does not work :-(

sallecpt 0 Junior Poster in Training

hey man.

I just read your post once again.

I think I misunderstood you. However, I have got another solution.

Check this out : http://www.phpclasses.org/package/4211-PHP-Update-page-parts-with-AJAX-when-links-are-clicked.html

Also, google for W3 AJAX - there is a nice sample, as I can recall, of retrieving data showing up in different tables.

Let me know if you got it.

whoops! sorry about that, was meant for a different post.

apologies.

sallecpt 0 Junior Poster in Training

you can also use div values to achieve this. google for w3 schools and focus on CSS, cause using the invisible property in a div tag, might do too

sallecpt 0 Junior Poster in Training

hey man.

I just read your post once again.

I think I misunderstood you. However, I have got another solution.

Check this out : http://www.phpclasses.org/package/4211-PHP-Update-page-parts-with-AJAX-when-links-are-clicked.html

Also, google for W3 AJAX - there is a nice sample, as I can recall, of retrieving data showing up in different tables.

Let me know if you got it.

sallecpt 0 Junior Poster in Training

hey man.

I just read your post once again.

I think I misunderstood you. However, I have got another solution.

Check this out : http://www.phpclasses.org/package/4211-PHP-Update-page-parts-with-AJAX-when-links-are-clicked.html

Also, google for W3 AJAX - there is a nice sample, as I can recall, of retrieving data showing up in different tables.

Let me know if you got it.

sallecpt 0 Junior Poster in Training

Okay, I can explain a lot here and write a tutorial, but the shortest method would be.... (I sometimes use it. use it as a base and rather write your own)

Google for Highslide. Download the package. it has pretty functions for images, but it has funtions for getting data and html pages too. As well as AJAX functions. No, all you do is, create a new page with the desired layout and data. Then, using highslide's html function, simply just call and display that page. Its really simple and easy, and not a lot of coding needed. let me know when you got it working.

URL for highslide is http://highslide.com/

note - you can use ajax or anything else, i just recommended highslide to get you starting.

sallecpt 0 Junior Poster in Training

i wanted to recommend ob_start too. most of the times it works, sometimes not. however, it is an excellent way to get rid of that message.

if it doesnt work, check your code. somewhere at the beginning of the page, there is a space in front of the <?php tag. if you dont find it, look again, because its there ;-)

sallecpt 0 Junior Poster in Training

hey

sorry but I cant do anything, because the code is incomplete, (I dont have the database structure and connect file)

and I dont completely understand your request.

however, for this : "How do I check if the input boxes, (price, origin, description) are empty?"

use something like <?php if (!isset($_POST)) { echo 'that box or value is empty!!!'; } ?>

sallecpt 0 Junior Poster in Training

hey

sorry but I cant do anything, because the code is incomplete, (I dont have the database structure and connect file)

and I dont completely understand your request.

however, for this : "How do I check if the input boxes, (price, origin, description) are empty?"

use something like <?php if (!isset($_POST)) { echo 'that box or value is empty!!!'; } ?>

sallecpt 0 Junior Poster in Training

there are loads of scripts on the net for this. google for the site phpclasses - they have loads of scripts too.

however, here is one that I use.

there are 4 files in total. it will backup the database en if you want, store a copy on the server, and if you want too, email it to an address.

#######################################

action_dbexport_run.php

<?php
$vr="1.0";
$db_server = '';
$db = '';
$mysql_username = '';
$mysql_password = ''; 
$from_emailaddress = 'doe@mail.com';
$to_emailaddress = 'jen@mail.com';
$save_backup_zip_file_to_server = 1;
$limit_to=10000000;
$limit_from=0;
$time_internal=5;
error_reporting(0);
define('LOCATION', dirname(__FILE__) ."/");
include(LOCATION."action_dbexport_sqlbackup.php");
?>

action_dbexport_schemaforexport.php

<?php
$vr="1.0";
$link = mysql_connect($db_server,$mysql_username,$mysql_password);
if ($link) mysql_select_db($db);
if (mysql_error()) exit(mysql_error($link));
if(mysql_num_rows(mysql_query("SHOW TABLES LIKE 'phpmysqlautobackup' "))==0)
{
   $query = "
    CREATE TABLE phpmysqlautobackup (
    id int(11) NOT NULL,
    version varchar(6) default NULL,
    time_last_run int(11) NOT NULL,
    PRIMARY KEY (id)
    ) TYPE=MyISAM;";
   $result=mysql_query($query);
   $query="INSERT INTO phpmysqlautobackup (id, version, time_last_run)
             VALUES ('1', '$vr', '0');";
   $result=mysql_query($query);
}
$query="SELECT * from phpmysqlautobackup WHERE id=1 LIMIT 1 ;";
$result=mysql_query($query);
$time_last_run=mysql_result($result,0,'time_last_run');
if (time() < ($time_last_run+$time_internal)) exit();
$query="UPDATE phpmysqlautobackup SET time_last_run = '".time()."' WHERE id=1 LIMIT 1 ;";
$result=mysql_query($query);
if (!isset($table_select))
{
  $t_query = mysql_query('show tables');
  $i=0;
  $table="";
  while ($tables = mysql_fetch_array($t_query, MYSQL_ASSOC) )
        {
         list(,$table) = each($tables);
         $table_select[$i]=$table;
         $i++;
        }
}
$thedomain = $_SERVER['HTTP_HOST'];
if (substr($thedomain,0,4)=="www.") $thedomain=substr($thedomain,4,strlen($thedomain));
$buffer = '# MySQL backup created by xxx type your stuff here' . "\r\n" .
          '#' . "\r\n" .
          '# ' "\r\n" .
          '#' . "\r\n" .
          '# Database: '. $db . "\r\n" .
          '# Domain name: ' . $thedomain …
sallecpt 0 Junior Poster in Training

dont understand what you want to achieve.

do you want to display the header info / details about some images or would you like a repeat region / loop to loop through multiple images?

in addition to this, do you store the filenames of the images in the database or do you use global or fopen to read directories?

sallecpt 0 Junior Poster in Training

hey

sorry for the delay.

got loads of work here

I will take all your code and try to work something out for you, however I cannot promise a definite solution since I am not clear on what your request is.

i'LL TRY TO DO IT ASAP

sallecpt 0 Junior Poster in Training

WOW. WORKS WONDERS. A HUGE THANK YOU TO LethargicCoder, AND ALSO TO rajarajan07 AND TO vibhadevit

Have a great day guys.

sallecpt 0 Junior Poster in Training

dont understand what you are trying to say

sallecpt 0 Junior Poster in Training

oops, forgot.

your field name would be name=xxx[$i]

sallecpt 0 Junior Poster in Training

dont have time to read through all the code, but what you want sounds pretty simple.

firstly to address something else :
"The images aren't going into the folder. Is this possibly due to Vista having problems with not being able to copy things into Program files?"
--> use absolute paths. btw do you have a testing server installed? Like wamp or xampp? or maybe ISS?

"How do I assign a variable to whatever the string was selected in the dropdown menu?"
--> use the count method;
something like $getcount = count($_POST); and

for ($i = 1; $i <= $getcount; $i++) {
    echo $i;
}

and submit your menu values as <option value = "xxx" name = "xxx"[]></option>

good luck

sallecpt 0 Junior Poster in Training

PHP is extremely powerful.

An so it is to read/edit/process plain text, as well as graphs - . But with graphs, it depends on which libraries you have installed. I would recommend using google's graphs tool. I like it and used it in several sites.

The other alternative is to do simple mathematics and use a CSS color or background image, and let it dynamically "draw" your graph, by multiplying and dividing to get a definite size for each bar. Almost similar to a poll script.

sallecpt 0 Junior Poster in Training

Could someone help me with this - I've cracked my head since.

When i submit a form and then retrieve the data, there is no paragraphs.

Yes I am aware of HTML encoders like TINYMCE but I'd like to submit in plain text.

I tried htmlentities and htmlspecialchars but nothing works. I just want to see a new paragraph when I've received the data of a submitted form. (a New paragraph after hitting ENTER twice)

Thanx

sallecpt 0 Junior Poster in Training

simple example for custom / dynamic fields/order by.

post your field and field value in the $_GET format (in other words, in the address bar) ie. domain.com/index.php?field=fieldvalue

in your SQL : select * table where ".$_GET." = ".$_GET."

sallecpt 0 Junior Poster in Training

hey guys.

I have two MySQL tables. I'll try to keep it short :-/ Basically I'd like to join these tables, and get the data from the database. Not here's the detailed info.

I usually use the JOIN function, but this time, no join statement does the job. Neither LEFT, RIGHT, OUTER, INNER nor just JOIN works.

The first table is something similar to this:

table1; fields : ID, articleID, Detail, Links
table2; fields : ID, linkID, articleID, Link

Now, the articleID only exist once in table1, but more than once in table2. In other words, I have multiple entries in table2 with one articleID.

My problem is that when I loop/do the data in PHP, I only want to have the data listed in table1, but as well as the linkID at the same time.

So, for example, I have 7 articles in table1, and 4 links in table2, where the 4 links in table2, has the same articleID of one of the entries in table2. So instead of showing the 7 articles, it shows 7+4.

I hope you understand.

Please please help.

Thanx a million

sallecpt 0 Junior Poster in Training

I've just gave you the full query with the solution in the post above!
Did you even run that query?

hey - thanx for the reply

yes I did run the query - and I've chopped and changed it thereafter, to seek other solutions. it only displays the first count - in other words - only the first count of the first result in the loop are displayed.

any suggestions?

thanx again

sallecpt 0 Junior Poster in Training

Hey guys.

First of all, thank you for your help. I've spent many many hours today, trying to get this thing to work.

I even tried all the methods on W3 Schools using COUNT - but it doesnt work. If I use the method as suggested by CWARN23, only the first 'filter' works.

I'm going to try a different angle of explanation;

I have a SQL table, with data, (cities) listed in the table, comma seperated. Like in; Memphis, Robinsonville, Chicago etc etc.

So what I want to achieve, is to explore the values in the single field, and list it below eachother - and I have achieved that by using the following :

$arr = explode(",", $row_subfilters['Values']);
reset($arr);
foreach ($arr as $line)
{  echo $line.'<br>';  }

Now - I have got another SQL table, with data in it - like explained in my initial post. Example :
Field One
ID, City, Description

This said table contains data in random order of the cities, where I used the explode function.

So, what I want to achieve, is to list the total records which include the name of the city.

I use it in a loop. The end end result would be using this as a 'search' filter, where one can click on a city, and only ads will be displayed of the relevant town.

So, I have achieved it to explore the values of the single sql field, but …