Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
Can I give a function multiple names?

I have a function called distance_between(). It calculates the Euclidean distance between two points. At some point I might like to add functions that calculate the distance between two points according to other metrics. So I'd like to keep a function called distance_between() and have it calculate the Euclidean distance, but also have a function called euclidean_distance_between() that does the same thing, and have other functions like taxicab_distance_between() or whatever. Can I set it up so that distance_between() and euclidean_distance_between() are the same function?

I know what the first thought you have is: just define distance_between() like the following:

code:
function distance_between (point $x, point $y) {
    return euclidean_distance_between ($x, $y);
}
But my function takes a variable number of arguments, so I don't know how I could make that work. (It takes anywhere from one to four arguments - each point specified can be given either as an object in my point class (thus as one argument), or as two numbers (thus as two consecutive arguments).)

Adbot
ADBOT LOVES YOU

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Hammerite posted:

But my function takes a variable number of arguments, so I don't know how I could make that work. (It takes anywhere from one to four arguments - each point specified can be given either as an object in my point class (thus as one argument), or as two numbers (thus as two consecutive arguments).)

You can do a variable number of arguments in php. Maybe pass in something like DISTANCE::EUCLIDEAN into your distance_between function? That way you only have to talk to that same function every time.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

fletcher posted:

You can do a variable number of arguments in php.

I know - I've got the function working how I want it using func_num_args() and so on. It's just that I can't work out how I'd get a function to call another function and pass it the same arguments, given that I don't know how many arguments my "outside" function is going to be called with.

fletcher posted:

Maybe pass in something like DISTANCE::EUCLIDEAN into your distance_between function? That way you only have to talk to that same function every time.

Maybe this is what I'll have to do.

Peanut and the Gang
Aug 24, 2009

by exmarx
Maybe you're looking for func_get_args() and call_user_func_array()?
php:
<?
function a(){
  $args=func_get_args();
  call_user_func_array('b',$args);
}
?>

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

barbarianbob posted:

Maybe you're looking for func_get_args() and call_user_func_array()?
php:
<?
function a(){
  $args=func_get_args();
  call_user_func_array('b',$args);
}
?>

Aha, so I write

code:
function distance_between () {
    return call_user_func_array('euclidean_distance_between', func_get_args());
}
Thanks!

IT Guy
Jan 12, 2010

You people drink like you don't want to live!
Is there a way to grab information from computers on your network such as IP address, MAC address, hostname, computer model, service tag, CPU and memory and maybe even hard drive usage with PHP on a linux server?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

IT Guy posted:

Is there a way to grab information from computers on your network such as IP address, MAC address, hostname, computer model, service tag, CPU and memory and maybe even hard drive usage with PHP on a linux server?

There was a really cool program I used like 5 years ago to do this...I can't remember the name of it though. Googling around I think it may have been Spiceworks. It would scan the network and find out all sorts of neat information about the computers on the network.

IT Guy
Jan 12, 2010

You people drink like you don't want to live!

fletcher posted:

There was a really cool program I used like 5 years ago to do this...I can't remember the name of it though. Googling around I think it may have been Spiceworks. It would scan the network and find out all sorts of neat information about the computers on the network.

You're correct, Spiceworks will do this and I have a server setup with Spiceworks. Although, I'm actually looking to hand code something into a customized intranet site/application.

DarkLotus
Sep 30, 2001

Lithium Hosting
Personal, Reseller & VPS Hosting
30-day no risk Free Trial &
90-days Money Back Guarantee!
Open Audit is another one. I've used it and it is pretty slick. All you need is a web server.

Apok
Jul 22, 2005
I have a title now!
So I'm a noob PHP user who had to learn the language for my senior project in college. I have no professional training and no questions, just answers (I might post questions at a later date).

So I was working with a script that prepares .txt files for mySQL inserts. I had used the foreach function to search through the arrays for useful data and came upon an interesting problem: I would have 300 lines to start and end up with 16k lines in my .txt file. I did not realize what was going on.

Here was my code:

php:
<?
while( !feof( $fh )){
    $data[] = fgets( $fh ) ;
    foreach( $data as $n => $string )
        if( preg_match( "/@/" , $string )){
            $string = preg_replace( "/\r\n/" , "" , $string ) ;
            $string = preg_replace( "/@/" , "" , $string ) ;
            $string = "'".$string."'\r\n" ;
            fwrite( $fh1 , $string ) ;
        }
        elseif( preg_match( "/%/" , $string )){
            $string = preg_replace( "/\r\n/" , "" , $string ) ;
            $string = preg_replace( "/%/" , "" , $string ) ;
            $string = "'".$string."'\r\n" ;
            fwrite( $fh1 , $string ) ;
        }
        else{
            continue;
        }    
        unset( $string ) ;
}?>
I wanted to return a[1] , b[1] , a[2] , b[2] , etc. Instead, I was getting something along the lines of a[1] , a[1] , b[1] , a[1] , b[1] , a[2] , b[2] , etc.

After many hours of smoking weed and trying different variations and lots of yelling, I realized that my fault was in using $string in the fwrite. There is a bug when you use foreach and do not redefine the array strings before writing them.

The fix was simple:

php:
<?
while( !feof( $fh )){
    $data[] = fgets( $fh ) ;
    foreach( $data as $n => $string )
        if( preg_match( "/@/" , $string )){
            $string = preg_replace( "/\r\n/" , "" , $string ) ;
            $string = preg_replace( "/@/" , "" , $string ) ;
            $string = "'".$string."'\r\n" ;
            $name[$n] = $string ;
        }
        elseif( preg_match( "/%/" , $string )){
            $string = preg_replace( "/\r\n/" , "" , $string ) ;
            $string = preg_replace( "/%/" , "" , $string ) ;
            $string = "'".$string."'\r\n" ;
            $seq[$n] = $string ;
        }
        else{
            continue;
        }
        unset( $string ) ;
}
for( $i = 0 ; $i <= count( $data ) ; $i++ ){
    $j = $i + 1 ;
    fwrite( $fh1 , $name[$i] ) ;
    fwrite( $fh1 , $seq[$j] ) ;
}?>
I hope this helps another newbie who is having the same problem! I now can sleep easy tonight knowing I have conquered a major programming dilemma!

Apok fucked around with this message at 07:54 on Apr 23, 2010

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Apok posted:

I hope this helps another newbie who is having the same problem! I now can sleep easy tonight knowing I have conquered a major programming dilemma!

Forgive me if I've not followed what you're doing correctly, but why are you using foreach() to iterate over the whole array "data" every time you go through the loop? It looks like only the most recently added array element is of importance each time through. That would explain why you were seeing many duplicated lines of output with the first version of your code. The second version "fixes" that problem after a fashion, but appears to carry out many useless calculations reaffirming values stored in arrays "names" and "seq" that are not going to change.

Thirteenth Step
Mar 3, 2004

php:
<?php
    // Connect to the database
    mysql_connect('localhost''root''');
    mysql_select_db('db');

$fetch mysql_query("SELECT usual_bar, usual_kitchen, usual_waiting, usual_cleaning FROM `shifts`");
$display mysql_fetch_assoc($fetch);

?>


code:
<form action="scripts/edit_rec_staff.php" method="post" name="editredstaff">
<table width="100%" border="0" cellspacing="0" cellpadding="2">
  <tr>
    <th width="80%">Shift</th>
    <th width="5%">Bar</th>
	<th width="5%">Kitchen</th>
	<th width="5%">Waiting</th>
	<th width="5%">Cleaning</th>
  </tr>
  <tr>
    <td>Monday Morning</td>
    <td><input type="text" name="monmornbar" size="1" /></td>
	<td><input type="text" name="monmornkitchen" size="1" /></td>
	<td><input type="text" name="monmornwaiting" size="1" /></td>
	<td><input type="text" name="monmorncleaning" size="1" /></td>
  </tr>
  <tr>
    <td>Monday Afternoon</td>
    <td><input type="text" name="monaftbar" size="1" /></td>
	<td><input type="text" name="monaftkitchen" size="1" /></td>
	<td><input type="text" name="monaftwaiting" size="1" /></td>
	<td><input type="text" name="monaftcleaning" size="1" /></td>
  </tr>
  <tr>
    <td>Monday Evening</td>
    <td><input type="text" name="monevebar" size="1" /></td>
	<td><input type="text" name="monevekitchen" size="1" /></td>
	<td><input type="text" name="monevewaiting" size="1" /></td>
	<td><input type="text" name="monevecleaning" size="1" /></td>
  </tr>
  <tr>
    <td>Tuesday Morning</td>
    <td><input type="text" name="tuesmornbar" size="1" /></td>
	<td><input type="text" name="tuesmornkitchen" size="1" /></td>
	<td><input type="text" name="tuesmornwaiting" size="1" /></td>
	<td><input type="text" name="tuesmorncleaning" size="1" /></td>
  </tr>
  <tr>
I'm having trouble wrapping my head around this... wondering if anyone can find out a way I can do this before I just scrap the idea altogether.

I have this table on my project site;



I have a read only version of this table which looks like;



When that green link is clicked it takes you to the 'edit' form (top picture) to which you can the edit these values.

What i'm trying to do is to get the values from the DB to populate the text boxes so the user can see what was in there previously before editing, and then a confirm button will save these values.

Is the SQL statement to do this going to be too wild? How would everyone go about doing this? Is the command to save all the values going to be too long?

Big Nubbins
Jun 1, 2004
I've got a script that takes a CSV file and generates records in a database. I use fgetcsv to handle the parsing, but it trips up on Windows-style line endings or whatever comes from Excel, and MAC line endings. Is there a silver bullet REGEX replace that will convert all wild line endings into UNIX-style?

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



greasy digits posted:

I've got a script that takes a CSV file and generates records in a database. I use fgetcsv to handle the parsing, but it trips up on Windows-style line endings or whatever comes from Excel, and MAC line endings. Is there a silver bullet REGEX replace that will convert all wild line endings into UNIX-style?

Before you open the file:
php:
<?
ini_set('auto_detect_line_endings',true);
?>

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Thirteenth Step posted:

Is the SQL statement to do this going to be too wild? How would everyone go about doing this?

It doesn't look that bad, but I think we'd need to see the table structure to know more. You know about the SQL help thread, right? http://forums.somethingawful.com/showthread.php?threadid=2672629

quote:

Is the command to save all the values going to be too long?

If you're worried about passing MySQL a string that's so long it crashes or something, don't. I can't say for sure, but I'd bet you'd hit your script memory limit before you made a string so big that it would crash the database (if that's even possible). Also, your dataset doesn't look very big.

Apok
Jul 22, 2005
I have a title now!

Hammerite posted:

Forgive me if I've not followed what you're doing correctly, but why are you using foreach() to iterate over the whole array "data" every time you go through the loop? It looks like only the most recently added array element is of importance each time through. That would explain why you were seeing many duplicated lines of output with the first version of your code. The second version "fixes" that problem after a fashion, but appears to carry out many useless calculations reaffirming values stored in arrays "names" and "seq" that are not going to change.

As I said, I have absolutely no training in any true coding at all (MSSQL doesn't count). I was forced to learn it. The code works for what I want. How could I change this? Is there a better way?

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



php:
<?
while( !feof( $fh )){
    $string = fgets( $fh ) ;
    $string = preg_replace( "/\r\n/" , "" , $string ) ;
    if( strpos($string,'@') !== false){
        $string = str_replace( '@' , "" , $string ) ;
    }elseif( strpos($string,'%') !== false){
        $string = str_replace( '%' , "" , $string ) ;
    }
    $string = "'$string'\r\n" ;
    fwrite( $fh1 , $string ) ;
}
?>
I think that does the same thing (edited to make it less wasteful)

Munkeymon fucked around with this message at 14:56 on Apr 26, 2010

spiritual bypass
Feb 19, 2008

Grimey Drawer

Munkeymon posted:

php:
<?
while( !feof( $fh )){
    $string = fgets( $fh ) ;
    if( strpos($string,'@') !== false){
        $string = preg_replace( "/\r\n/" , "" , $string ) ;
        $string = str_replace( '@' , "" , $string ) ;
        $string = "'$string'\r\n" ;
        fwrite( $fh1 , $string ) ;
    }elseif( strpos($string,'%') !== false){
        $string = preg_replace( "/\r\n/" , "" , $string ) ;
        $string = str_replace( '%' , "" , $string ) ;
        $string = "'$string'\r\n" ;
        fwrite( $fh1 , $string ) ;
    }
}
?>
I think that does the same thing

...or you could probably just `dos2unix $filename` before you read the file.

gibbed
Apr 10, 2006

preg_replace("/\r?\n|\r/", "\n", ...)?

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



rt4 posted:

...or you could probably just `dos2unix $filename` before you read the file.

And he could remove the @s and %s and add single quotes around each line with other command line tools, but he's doing it in PHP for whatever reason

spiritual bypass
Feb 19, 2008

Grimey Drawer

Munkeymon posted:

And he could remove the @s and %s and add single quotes around each line with other command line tools, but he's doing it in PHP for whatever reason

Sure, but those backticks are PHP :q:

DoctorScurvy
Nov 11, 2005
More of a passing curiosity, really

greasy digits posted:

I've got a script that takes a CSV file and generates records in a database. I use fgetcsv to handle the parsing, but it trips up on Windows-style line endings or whatever comes from Excel, and MAC line endings. Is there a silver bullet REGEX replace that will convert all wild line endings into UNIX-style?
What I would do is use mysql's function LOAD DATA INFILE which can take files and put them into the database directly without any messing about with php.
code:
LOAD DATA INFILE 'c:/data.csv' INTO TABLE `tablename` FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
If your table is not the same format, or doesn't need all of the csv fields, make a temporary table and then copy the necessary data from that into the real one.

Acer Pilot
Feb 17, 2007
put the 'the' in therapist

:dukedog:

Anybody here have some sort of template system or maybe general alternative to Smarty?

gwar3k1
Jan 10, 2005

Someday soon

Thirteenth Step posted:

Is the SQL statement to do this going to be too wild? How would everyone go about doing this? Is the command to save all the values going to be too long?

Use the same SQL that drives your read-only form, and add the attribute value='' into the inputs of the form using the results array in the same way you do with the table:

php:
<?
  echo "<input value='".$results['bar']."'></input>";
  //or inline html version
  <input value='<? echo $results['bar']; ?>'></input>
?>
The value from the database will be entered into the input. When you change the value and submit the form, its the current value that gets submitted, not the hardcoded one.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

drcru posted:

Anybody here have some sort of template system or maybe general alternative to Smarty?

Are you looking for something "lighter" than smarty, or a better MVC framework?

Thirteenth Step
Mar 3, 2004

gwar3k1 posted:

Use the same SQL that drives your read-only form, and add the attribute value='' into the inputs of the form using the results array in the same way you do with the table:

php:
<?
  echo "<input value='".$results['bar']."'></input>";
  //or inline html version
  <input value='<? echo $results['bar']; ?>'></input>
?>
The value from the database will be entered into the input. When you change the value and submit the form, its the current value that gets submitted, not the hardcoded one.

So simply doing this will work?

The thing I can't seem to wrap my head around is the concept of identifying all of the values in the DB and what I need to type in order to get them all to display in the text boxes.

gwar3k1
Jan 10, 2005

Someday soon

Thirteenth Step posted:

So simply doing this will work?

The thing I can't seem to wrap my head around is the concept of identifying all of the values in the DB and what I need to type in order to get them all to display in the text boxes.

Its odd that you know mysql_fetch_assoc() but don't understand how to output data. Are you following a tutorial and its incomplete or are you not grasping concepts? https://www.php.net has fantastic documentation for its functions. Just put in mysql_fetch_assoc to the search and look at the examples which show you what to do and what to expect.

You need to develop your fetch routine to include a while to accomodate the different shifts. $display is an array of the fields returned from your query for every row returned. To access the value of usual_bar, you would use $display['usual_bar'];

php:
<?
$tablerows = "";
// for every row returned
while($display = mysql_fetch_assoc($fetch)
{
  // Append ouput with current row
  $tablerows .= "<tr>\n";
  //...
  $tablerows .= "  <td><input ... value='".$display['usual_bar']."'></td>\n";
  $tablerows .= "  <td><input ... value='".$display['usual_kitchen']."'></td>\n";
  //...
  $tablerows .= "</tr>";
}
?>
Then you would echo $tablerows in your table to view the output.

rugbert
Mar 26, 2003
yea, fuck you
OK, so Ive passed a bunch of variables over from a form using various inputs using get and I can grab them all but the check box stuff.

The check boxes all have the name searchUtils and appear in the url bar as
searchUtils=Heating+(gas)&searchUtils=Gas&searchUtils=Internet&searchUtils=Cable


how do I get all of those variables? $searchUtils = $_GET['searchUtils']; only grabs the last one.

epswing
Nov 4, 2003

Soiled Meat
First hit on google for "php checkbox": http://www.html-form-guide.com/php-form/php-form-checkbox.html

It's not the greatest example, but it answers your question.

Google first, ask second!

DoctorScurvy
Nov 11, 2005
More of a passing curiosity, really

rugbert posted:

OK, so Ive passed a bunch of variables over from a form using various inputs using get and I can grab them all but the check box stuff.

The check boxes all have the name searchUtils and appear in the url bar as
searchUtils=Heating+(gas)&searchUtils=Gas&searchUtils=Internet&searchUtils=Cable


how do I get all of those variables? $searchUtils = $_GET['searchUtils']; only grabs the last one.
Instead of naming them 'searchUtils', name them 'searchUtils[]' and they will come back as an array. $searchUtils[0]="Heating gas", $searchUtils[1]="Gas" etc

Acer Pilot
Feb 17, 2007
put the 'the' in therapist

:dukedog:

Lumpy posted:

Are you looking for something "lighter" than smarty, or a better MVC framework?

Something "lighter."

indulgenthipster
Mar 16, 2004
Make that a pour over
I've been doing a lot of research on PHP frameworks and am thinking about porting one of my current projects into Yii. Does anyone have any experience with this framework? Any recommendations before I get started?

MrMoo
Sep 14, 2000

drcru posted:

Something "lighter."

But what are you looking for that is more than just PHP itself?

Acer Pilot
Feb 17, 2007
put the 'the' in therapist

:dukedog:

MrMoo posted:

But what are you looking for that is more than just PHP itself?

True, how do you guys do it? I've never tried before.

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

drcru posted:

True, how do you guys do it? I've never tried before.

What exactly do you need, whether it's more or less than what PHP provides, or just plain different? For example, in the template system I use for my framework, one of its primary benefits is to guarantee well-formed XML. Maybe you give a poo poo about that, maybe you don't.

Or maybe you just want to limit what your designers can do in the view portion of an MVC architecture. Like you want to make sure that arbitary SQL queries aren't executed at render time. That's a worthwhile goal, but do you need to enforce it in a secondary/proprietary domain language, or is a mandated convention good enough?

Lots of people will tell you that PHP is already a templating language, so you might as well use it directly instead of adding another layer to it. They're kinda right, but here's the rub: PHP, straight out the box, is an astoundingly lovely templating language. Anyone who works with MVC in PHP long enough will eventually want a more practical way to abstract the view, and the only people who think "plain PHP is good enough" are either inexperienced hacks or Rasmus Lerdorf himself.

Smarty is a lovely alternative because it's just PHP with a different syntax. Useful for limiting what can be performed in a view, but so bad at it that most implementations let you embed PHP into the templates anyway.

Long story short: there's no way to make this story short. Here be dragons.

Thirteenth Step
Mar 3, 2004

php:
<?
// printing table headers
    for($i=0; $i<$fields_num; $i++) {
        $field = mysql_fetch_field($result);
        
        echo "<th><b><center><u>
    
                <STYLE>
                    <!-- tr { background-color: #ffffff}
                    .normal { background-color: #CCCCCC } //-->
                </style>
    
        {$field->name} </center></u></b></th>";
    }
        echo "</tr>\n";
        
    // printing table rows
    
    while($row = mysql_fetch_row($result)) {
    
    echo "<tr>";

    // $row array created. foreach( .. ) puts every element
    // of $row to $cell variable
    
    foreach($row as $cell)
        echo "<td><input type='text' size='5' value='$cell'></td>";

    echo "</tr>\n";

}
?>
I've been messing with this for a while now and can't get it to do what I want.



That is what it's outputting. As you can 'probably' work out, the headers are fine but the cells below need to be shifted along to the right by 2, and then I want to echo the contents from 2 fields in there that are aren't editable under 'day' and 'shift'.

So really under 'day' and 'shift' I want to have 'Monday' and 'Morning' for example as labels and not in text boxes, which are stored in the db.

gwar3k1
Jan 10, 2005

Someday soon
That's an SQL question. Do you have the fields "day" and "shift" in the same table as your values? If so, select them in your query:

select day,shift,bar,kitchen,waiting,cleaning.

It'll output the 6 fields, giving you six columns (assuming each field has data in the database).

I can't help but get the feeling this is a school project. You seem to be falling into a lot of bad habbits and I would speak to a lecturer for guidance if this is the case.

Thirteenth Step
Mar 3, 2004

gwar3k1 posted:

That's an SQL question. Do you have the fields "day" and "shift" in the same table as your values? If so, select them in your query:

select day,shift,bar,kitchen,waiting,cleaning.

It'll output the 6 fields, giving you six columns (assuming each field has data in the database).

I can't help but get the feeling this is a school project. You seem to be falling into a lot of bad habbits and I would speak to a lecturer for guidance if this is the case.

It's a project that im working on for a place I used to work, i find I learn better by jumping in at the deep end and learning as I go along. Yeah the values I want there are in the same table and they are selected, it was more about outputting them in a non-editable form, because the output inside of the loop defines text boxes, which I guess is a we design thing, sorry.

gwar3k1
Jan 10, 2005

Someday soon

Thirteenth Step posted:

It's a project that im working on for a place I used to work, i find I learn better by jumping in at the deep end and learning as I go along. Yeah the values I want there are in the same table and they are selected, it was more about outputting them in a non-editable form, because the output inside of the loop defines text boxes, which I guess is a we design thing, sorry.

Ah okay, sorry. If you look at my previous example, you can access each array item individually by using $row['fieldname']. Try the following:

php:
<?
// loop all returned rows
while($row = mysql_fetch_assoc($query)
{
  // loop all items within the $row array
  for(i = 0; i<=count($row)-1; i++)
  {
    // conditional select based on index of $row array
    switch($i)
    {
      // first two indexes
      case 0:
      case 1:
        // output non-field cell
        break;
      // all other indexes
      case else:
        // output field cell
        break;
    }
  }
}?>

Adbot
ADBOT LOVES YOU

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Thirteenth Step posted:

It's a project that im working on for a place I used to work, i find I learn better by jumping in at the deep end and learning as I go along. Yeah the values I want there are in the same table and they are selected, it was more about outputting them in a non-editable form, because the output inside of the loop defines text boxes, which I guess is a we design thing, sorry.

Please don't take this the wrong way, but you need to do one of two things 13th:

1) Sit down with the most basic of basic "This is what a variable is. A function is .... " books for a month or two, and work yourself up to posting forms and storing things in a DB.

2) Just pay somebody else to do your project for you. You can't possibly be getting paid enough for the amount of time you are spending on this trivial stuff.

You keep bouncing from thread to thread asking the same types of questions over and over, which leads me to believe you don't grasp some very basic concepts that you really should before you try to write anything. It's not that we don't enjoy helping you, but you can't seem to apply things people teach you form one question to the next. Again, I'm not trying to be a douche, and the whole reason for these threads is to help, but if I posted "How do I paint my house red?" and somebody answered "Go buy red paint and a brush, then apply the paint to the house with the brush" I would hope that I wouldn't need to ask "OK, my house is red, but now I want to paint my garage blue... how do I do that?" a day or two later.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply