ShawnCplus 456 Code Monkey Team Colleague

1. Use code tags
2. What was the error

ShawnCplus 456 Code Monkey Team Colleague

Why can't you use cron?

ShawnCplus 456 Code Monkey Team Colleague

It's most likely from google toolbar showing them fields they can autocomplete. It's not your site, go yell at your client.

ShawnCplus 456 Code Monkey Team Colleague

That could be done in pretty much any language, it's just simple math. You could even do it in javascript if you wanted to. Check out tutorials for different web languages and see which one you would like to work with (It doesn't have to be PHP) w3schools.com is a great resources

ShawnCplus 456 Code Monkey Team Colleague

That's extremely vague. Would you like to elaborate a bit?

ShawnCplus 456 Code Monkey Team Colleague
  1. Step 1: Use Code tags
  2. Step 2: Read the rules
  3. Step 3: Show effort

I don't believe you've done any of those things.

ShawnCplus 456 Code Monkey Team Colleague

The super keyword, to my understanding would be used with this syntax in php

parent::someFunc();
ShawnCplus 456 Code Monkey Team Colleague
ShawnCplus 456 Code Monkey Team Colleague

People are throwing around the word AJAX as if it is synonymous with DHTML.

var container = document.getElementById('the_form_container');
var newfield = document.createElement('input');
newfield.type = 'text';
newfield.id = someCounter+'_suffix';
container.appendChild(newfield);

^ Not AJAX

ShawnCplus 456 Code Monkey Team Colleague

...

$parsed_string = preg_replace(array('#\[\[#',
                                    '#\]\]#'),'',$whatever_string);
ShawnCplus 456 Code Monkey Team Colleague

Create a script that usesa while statement that increments through and prints every even number between 1 and 49.

Can any one do that for me?!?

No, in case you missed the signs, rules, signatures and giant bold text everywhere, we don't do your homework for you.

ShawnCplus 456 Code Monkey Team Colleague

http://us3.php.net/manual/en/language.oop5.decon.php
Unless you have created a constructor that overrides the parent constructor it will use the inherited method

ShawnCplus 456 Code Monkey Team Colleague

Well, the short answer is No, the long answer is to force them to enable javascript for your page.

ShawnCplus 456 Code Monkey Team Colleague
ShawnCplus 456 Code Monkey Team Colleague

Its possible but I wouldn't recommend it. If, down the line, you want to add an actually .js file you'd have to either A) change the file extension or B) add another handler. The quickest way to do this is have all your Javascript in a PHP file then at the top of the file define the content type:

<?php header("Content-type: text/javascript"); ?>
function someJavascriptFunction(){
  js1 = <?php echo $blah ?>;
}

There's nothing saying a script source MUST be .js

<script type="text/javascript" src="someJS.php"></script>
ShawnCplus 456 Code Monkey Team Colleague

I have seen no evidence of this.

Ever heard of a little service called Twitter?

ShawnCplus 456 Code Monkey Team Colleague

It doesn't work because script tags can never be short-tags i.e., <tagname />, they must be explicitly closed i.e., <tagname></tagname>

ShawnCplus 456 Code Monkey Team Colleague

Chances are if you know about the exploit then the developers of TikiWiki know about it and have already patched it in a newer version. Just update.

ShawnCplus 456 Code Monkey Team Colleague

Apache 2.2.6 over IIS any day in my book but I also prefer Linux. If you're currently running IIS I'm assuming you are more familiar with windows. Also remember that Apache is free

ShawnCplus 456 Code Monkey Team Colleague

You could just use a cookie rather than a session variable, that would allow it to be accessible no matter what language you're using.

ShawnCplus 456 Code Monkey Team Colleague

Java is (recently) Open Source

ShawnCplus 456 Code Monkey Team Colleague

Well the error is generated when you try to get an element that doesn't exist so the simple question is, does the element with the ID "content" exist on the page before you make that call?

ShawnCplus 456 Code Monkey Team Colleague

I think what you are loooking for is something like Ruby on Rails

Ruby on Rails isn't exactly Enterprise level, it has horrible scalability. PHP has been argued to be enterprise level, and Java is supposedly an enterprise level language ( JSP ). Really, its all up to you, there's no sense in using a language that you hate only to get halfway through a project and start dreading looking at the code every day. Pick a language with a syntax you're familiar with ( Though ASP.NET doesn't really have too many equivalents [ I don't really like a language with an ain't keyword])

ShawnCplus 456 Code Monkey Team Colleague

Firstly, remember that those are absolutely links meaning if that page goes anywhere besides your machine those images are broken. Secondly, to maintain cross-browser compatibility onClick should be onclick . Finally, you don't actually have any Javascript there for us to debug ( When you post the code please use code tags )

ShawnCplus 456 Code Monkey Team Colleague

Actually that's accomplished quite easily with a little Apache voodoo known as ModRewrite. Lets say you are using the fake directory app

RewriteEngine On
RewriteRule ^app/(.*)/?$ /index.php?app=$1

Place that in the .htaccess file and it will be completely transparent to the user.

ShawnCplus 456 Code Monkey Team Colleague

I'm not quite sure what you want to accomplish, and I'm also note sure what the word intiame means, Google doesn't either. You can send as many request parameters as you like given the HTML protocol

ShawnCplus 456 Code Monkey Team Colleague

If nl2br isn't working for you the wordwrap function might

ShawnCplus 456 Code Monkey Team Colleague

Don't format their input when they enter it. Format it on output. And since you aren't showing the html/css of where it's getting displayed I can't help you fix that part.

ShawnCplus 456 Code Monkey Team Colleague

The function is called nl2br That will turn all newlines into HTML linebreaks.

Example:

$Input = "Testing
This is on a new line";
echo nl2br($Input);

Output

Testing<br />
This is on a new line
ShawnCplus 456 Code Monkey Team Colleague

What exactly is "that" page?

ShawnCplus 456 Code Monkey Team Colleague

Its done with hidden iframes.
http://www.adapa.si/products/lib/javascript/upload-with-iframe.aspx
Thats just one example but Googling 'iframe upload' will find umpteen examples.

ShawnCplus 456 Code Monkey Team Colleague

Any additional arguments you pass the Java() call will be interpreted as arguments.

$obj = new Java("someObject", "arg1");
ShawnCplus 456 Code Monkey Team Colleague

This should answer pretty much everything.
http://us3.php.net/mysql

ShawnCplus 456 Code Monkey Team Colleague

The error is most likely from an invalid query that is using `paysonllc_db1.email` as the table in the SELECT clause, ie., SELECT * FROM paysonllc_db1.email which would throw an error because the FROM statement only takes a table name.

ShawnCplus 456 Code Monkey Team Colleague

You can use something called a variable variable(yeah, I know it's weird)

$variable="name";
$$variable = "Shawn";
echo $name; // prints Shawn
ShawnCplus 456 Code Monkey Team Colleague

It's not a Firefox bug its that you're only coding for IE. Use this to get your request object

var XMLHttpFactories = [
	function () {return new XMLHttpRequest()},
	function () {return new ActiveXObject("Msxml2.XMLHTTP")},
	function () {return new ActiveXObject("Msxml3.XMLHTTP")},
	function () {return new ActiveXObject("Microsoft.XMLHTTP")}
];

function createXMLHTTPObject() {
	var xmlhttp = false;
	for (var i=0;i<XMLHttpFactories.length;i++) {
		try {
			xmlhttp = XMLHttpFactories[i]();
		}
		catch (e) {
			continue;
		}
		break;
	}
	return xmlhttp;
}

Then just

var xmlHttp = createXMLHTTPObject();
ShawnCplus 456 Code Monkey Team Colleague

Go take a look at how switch statements work, they aren't if statements.

switch($Series){
case 'A': // equivalent to if($Series == 'A')
  do_something();
  break;
default:  // default handles what happens if none of the cases are true
case 'B': // equivalent to else if($Series == 'B')
  do_something_else();
  break;
}
ShawnCplus 456 Code Monkey Team Colleague

\s is the control character for whitespace (tabs, spaces, and newlines) so just add that to your regex which is also not working as you think it should given that you aren't escaping regex control characters. It should be something along the lines of

$something = preg_replace('/[^\w~!@#\$%&\*\(\)\-=\+'\|:;",\./\?\s]/','',$something_else);
ShawnCplus 456 Code Monkey Team Colleague

This is the perfect situation for a switch statement. PHP can use a switch statement on strings unlike C.

switch($Series){
case "A":
  do_something;
  break;
default:
case "D":
 do_something_else;
 break;
}
ShawnCplus 456 Code Monkey Team Colleague

You have the statement correct but you don't need those extra parenthesis

if ($Series == "D" && $ModelYear == "2"){
  echo "Skylark";
} else {
  echo "This is not a valid Series";
}

That should work just fine, I'm not entirely sure what the problem is.

ShawnCplus 456 Code Monkey Team Colleague

I believe JQuery can take a class as a parameter something like $('.classname') rather than $('#id')

ShawnCplus 456 Code Monkey Team Colleague

....yes

ShawnCplus 456 Code Monkey Team Colleague

Of course you can. Basically everthing ist possible with PHP, even complicated stuff when you extend it with system-specific functions.

Things that generally cannot be solved in PHP:
- JAVA (Chat, Games)
- Flash (Animations, Games)
- JavaScript (Eventhandling and Website-manipulation)

That's not entirely true, PHP has functionality to import Java classes and manipulating your javascript through PHP is an an essential tool.

Back to the problem at hand: Paypal has an extensive PHP API available, poking around their website will help you out.

ShawnCplus 456 Code Monkey Team Colleague

Query strings are used when you need to send data through the URL.

<a href="somePage.php?first_name=Foo&last_name=Barr">Barr, Foo</a>

When a user clicks on that link it will send them to the page somePage.php with the following data.

first_name = Foo
last_name = Barr

The first variable is appended to the url with ?<variable name>=<value>. Any additional variables are appended with an ampersand, ie., somePage.php?var1=blah&var2=blah2 Hope that helps.

ShawnCplus 456 Code Monkey Team Colleague

It's called pagination

ShawnCplus 456 Code Monkey Team Colleague

You set the form's action to <?php echo $_SERVER['PHP_SELF'] ?> . The page will post back to itself.

ShawnCplus 456 Code Monkey Team Colleague

I'm pretty sure it has to be surrounded with quotes, ie.,

SELECT first,last, number from friend WHERE id IN ('1','2','3','4')
ShawnCplus 456 Code Monkey Team Colleague

You're trying to call a function that doesn't exist. Where is the definition for get_option

ShawnCplus 456 Code Monkey Team Colleague

You forgot the underscore between get_option on line 9, and please, please use code tags next time.

ShawnCplus 456 Code Monkey Team Colleague

Small script to pull information from Trac. Note that this will only work if you set up your trac environment to use a MySQL database (It is pretty simple to switch from SQLite to MySQL though).
It uses template format just to make it easy to customize. I originally had commit comments running through a Wiki parser but removed it just so there are zero dependencies for the script.

<?php $db = mysql_connect('<host>', '<user>', '<password>') or die('Unable to sync with Trac') ?>
<?php $latest_revision = mysql_query("SELECT rev, time, author, message FROM trac.revision ORDER BY time DESC LIMIT 0,1",$db) ?>

<?php if($latest_revision) while($revision = mysql_fetch_assoc($latest_revision)): ?>
<br />
  <table border='0'>
    <thead>
      <tr><td style='font-size:larger;text-decoration:underline;'><b>Repository</b></td></tr>
    </thead>
    <tr>
      <td><b>Revision:</b></td>
      <td><?php echo $revision['rev']; ?></td>
    </tr>
    <tr>
      <td><b>Author:</b></td>
      <td><?php echo $revision['author'] == ''?'Anonymous':$revision['author'] ?></td>
    </tr>
    <tr>
      <td><b>Date of Change:</b></td>
      <td><?php echo date('F jS @ g:ia', $revision['time']) ?></td>
    </tr>
    <tr><td><b>Commit Message:</b></td></tr>
    <tr><td colspan='2'><?php echo nl2br($revision['message']) ?></td></tr>
    <tr><td colspan='2'>
          <a href='http://<url to trac server>/trac/changeset/<?php echo $revision['rev'] ?>' target="_blank">View Summary of Changes</a>
    </td></tr>
  </table>
<?php endwhile; ?>

<?php $latest_doc = mysql_query("SELECT name, time, author, comment FROM trac.wiki ORDER BY time DESC LIMIT 0,1",$db) ?>

<?php if($latest_doc) while($wiki = mysql_fetch_assoc($latest_doc)): ?>
<br />
  <table border='0'>
    <thead>
      <tr><td style='font-size:larger;text-decoration:underline;'><b>Documentation</b></td></tr>
    </thead>
    <tr>
      <td><b>Page:</b></td>
      <td><?php echo $wiki['name']; ?></td>
    </tr>
    <tr>
      <td><b>Author:</b></td>
      <td><?php echo $wiki['author'] == ''?'Anonymous':$wiki['author'] ?></td>
    </tr>
    <tr>
      <td><b>Date of Change:</b></td>
      <td><?php echo date('F jS @ g:ia', $wiki['time']) ?></td>
    </tr>
    <?php if($wiki['comment'] != '' && $wiki['comment'] != null ): ?>
      <tr><td><b>Change Comment:</b></td></tr>
      <tr><td colspan='2'><?php echo nl2br($wiki['comment']) ?></td></tr>
    <?php endif; …