Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Auto Code Colouring


I am building a tutorial site and I was wondering what you had to do to a piece of text to make it automatically format the colour!

Eg. on this forum anything in the code/php BBtags the code is coloured for easy of editing and viewing!




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Auto Executing PHP Code
Right now i am on a matrimonial site. i wanna do an auto match finder. ie; there may be many registrations in the site. i wanna findout all those matched profiles on a daily basis, say by 12 midnight each day. i wanna get that list as a mail even if i didn't checked the admin screens. ie; the script should execute on 12 midnight each day automatically. is there any way. can i do it using PHP.

Need Auto Save Code
Hi every oneI have to use auto save functionality just like gmail. If some already used such function then please send me code.

Code For Auto Response
i have a php file on a web site that send information to an email account for inquiry purposes. i need to add an auto response to the form. Code:

Auto-documenting Existing Code? (not Just PhpDoc)
I would like to auto-doc some existing code, mostly so I can
understand it. I am slowly adding PhpDoc comments, but I miss some
tools which I have for C/c++.

For instance, the Code Visual to Flowchart - automatic code flow chart
generator at http://www.fatesoft.com/s2f/ looks great - but costs $180.
Does anyone know of anything which will anaylze PHP code and
auto-generate flowcharts ... for free? (a lot to ask, I know)

Or, more simply, what about a function call-tree generator? There are
any number of these as GPL for C - does anyone know of such a thing for
PHP?

Or even just something to show which files incldue which others, in a
large project?

Is anything else which might help, which have not mentioned? Preferably
freeware.

Simple PHP Code--Auto Download Image
What PHP code would I need to simply download an image from an internet address and save it to a location on the server?  At regular intervals?  Can PHP somehow be added to the Windows task scheduler?  I have some security cameras that can FTP images to my server but when I have the FTP enabled and uploading images every 10 seconds, they become unstable and crash.  Viewing the image through the web browser doesn't seem to make them unstable.

How To Auto Prepend File To Show PHP Source Code
I know there is a auto_prepend option in php.ini. If I have a file like this: PHP Code:

Wanted: Syntax-colouring Scripts?
Are there any syntax colouring scripts out there?

Ones where you provide the script with the path or URL of some source
file - and they return a web page containing correctly-coloured
source code?

I'd be particularly interested in a version in PHP that rendered
HTML/PHP/Javascript.

Command-line Php Displays Code Instead Of Executing Code
I am using CLI PHP to run a PHP script, c:wampphpphp.exe, but
instead of executing my script, it's actually displaying the raw code
instead.

How can I run my code using CLI PHP? I installed WAMP5 on WinXP.

Old Code Vs New Code - Language Syntax Change?
I've recently begun programming PHP again and have found my old code doesn't work anymore. It's been a few years since my code was written, and simple functions don't seem to be working. I've done a bit of research into the syntax again and found the following;

I used to use a function as such;

if ($REQUEST_METHOD=="POST") {
Now I've seen alot of the syntax is
if ($_SERVER($REQUEST_METHOD=="POST")) {
And referencing variables from the form is as such;
$_POST['variable']

Where previously I could reference them in the simple form; $variable

Has there been a language syntax change that would cause my old code to be obsolete? Is there a configuration line that could be changed to allow this old code to work?

Auto-Tab
I have a page that has 5 input boxes, the first box holds 5 characters, the second holds 4 and carries on varying in length. I need to find a way so that when a user enters the 5th char in the first box, then the cursor moves to the second box and so on...

Auto Variable
Say I have fetched these from my mysql database:

13
14
23
39
80

How do I make them assigned into an automatic variable?

Forms In PHP With Auto Tab
anyone knows how to achieve a form with at least 12 input fields that need an automatic tab since the application uses bar code reader?

Auto Calculations
I've seen on a few sites that in a shopping enviroment if you choose a price from a drop down and then maybe a delivery ares, the actual price shown for the product is updated instantly without page refresh.

Auto Run A 2nd Script ?
I have 2 scripts, After the 1st script is run/activated, i'll like it to automatically forward the result (POST) to the 2nd script ....

Auto Increment By More Than 1
I have a table that I want to automatically generate an account number. I previously developed a simple database using appleworks that allows one to enter the amount she needs to add to the ID field with each new record. MySQL does not allow for this so I figure I must add it to the PHP script. PHP Code:

What Will The Next Auto Increment Be?
I have a MYSQL table with a field that auto increments 'ID'. I need to know what the next ID will be. Is there a simple way to do this?

One solution I've thought of is to query all the records and sort it by ID, and then just take the last record +1. But that seems awfully inefficient. Does anybody have any other suggestions or know of any functions that will do this?

Auto Number
How to generate auto number for php? For example, every time I submit the details to another page, the number will add from 10001 to 10002.

Auto Backup
how will i take auto backup mysql database table data after 6 hours daily? i know that this is very easy to take backup database table or full database manualy by using mysql dump syntax but i need to take it autometicaly daily after 6 hours.

Auto Php Upload
Senario A:

I've a form actually .csv, when a user finished filling out the form,after that when user click save button auto upload the file .csv file from server A where original .csv file(testing server) to server B (life server).

Senario B:

Same concept but when user click save button,the save button disable and button upload will appear but cannot browser and it is possible to put value in input type="file"??? The reason don;t want user to have capability to browse server A(testing server).

Auto Increment
how when you have an auto-incremented mysql list? And you know how when you delete an entry, the entry's auto-increment value just gets dropped and skipped? What I need to know is if there is a way to sort of re-number the list, preferably using a Query, such as an ALTER command or something. Code:

Auto Load
I am tring to figure out how to do something. I am starting to build a collection of coomon used php class, kind of a framework but not really, that i will be using for all my site.  For instance i have a database class that handle all mysql database stuff.  I have a site class that handles html stuff(generating header/footer, form elements, etc..,

i just have all these classes included in 1 folder but it is starting get big and i would like to be able to start searating them with folders. the problem is how can i tell the auto load where the class is without changing the name of the class?

Auto Session_start();
Is there a way without code <?php session_start();?> ontop of each page to get that affect?

PHP Auto Counter
I want to be able to make a list of number in a colum that changes when a line is added to the middle of it. I have looked for it but cant find anything about it.
I will put an axample to explain myself better.

 #  |   |   |   |   |
------------------
 1  | a | a | a | a |
 2  | h | h | h | h |
 3  | n | n | n | n |
 4  | z | z | z | z |

Now i want to add a c value between  a and h

 #  |   |   |   |   |
------------------
 1  | a | a | a | a |
 2  | h | h | h | h |
                            <----------  3  | c | c | c | c |   I want it to get number 3  automatically and that the rest of the numbers rols one forward.
 3  | n | n | n | n |
 4  | z | z | z | z |

Auto Linebreaks?
Is there a certain way to 'auto-magically' add line breaks when enter is pressed?

That way, you don't need to say something like..

This is a message.<br /><br />

Messages are fun!
Normally, if you type...

This is a message.

Messages are fun!
It would turn out like this.

This is a message. Messages are fun!

Auto Drop Down Box
I need to create an auto drop down box. For example I already have a list of states that are pulled from the database. When the user selects a state, a drop down box below should populate with the cities from that state. (that's where I'm having trouble)

This is a search form so the results have to reflect what city and state they chose. (along with some other criteria)

I've searched all evening for instructions on how to do this and so far I've only seen javascript that you put directly in the code. If I have all 50 states along with their related cities that's an awful lot of code to put in the page.

Isn't there a way to automatically pull the cities from the database to populate the box when the user clicks a state? I have no idea where to start to make that work.

Getting Last Id Of The Auto-increment Key
I have two tables and I need to get the last id of the primary key in one of the tables. I did some searching and found a solution that works.

$sql=mysql_query("INSERT INTO (table) (column) VALUES ('test')") or die (mysql_error());
$insert_id=mysql_insert_id();
$num = $insert_id + 1;   //need to increase the last id by one to match new entry in other table

This works well. The downside is in order for this to work an actual value is filed into a new row of (table) after the last id found in (column) thus giving me a blank row. While this isn't too bad, I could imagine I'll end up with a bunch of empty rows in my table. Is there a way to prevent this from happening -- i.e., a bunch of empty rows?

Auto Run Scripts
This is probably a real simple thing to do but I have never done it before!

I have an apache server on my server (XAMPP) running PHP and I want to be able to programme it to run a php script at certain times.  Is this a server or PHP task and how would it be done?

Getting An Auto-increment Id?
When someone creates a topic, the following is executed:

$sql = mysql_query("INSERT INTO `reflexproj`.`topics` (`topic_name`, `topic_desc`, `poster`, `forumid`) VALUES ('". $posttitle ."', '". $desc ."', '". $sessionu ."', '". $forum ."');");

This inserts the topic into the topic table. However, then this is executed:

$sql = mysql_query("INSERT INTO `reflexproj`.`posts` (`poster`, `post`, `topicid`) VALUES ('". $sessionu ."', '". $fp ."' '". $id ."');");

This is meant to insert a post into the posts table that starts the topic. However, this is a problem. The problem is, that $id hasn't been defined.

My question is this, really: How do I get $id? Basically, I've got to find a way of getting an auto_increment value from a database. Anyone any ideas?

Auto Linking
i'm tryin go to do a auto link thing and i'm running into some problems with my mysql statements

$sql_query = "SELECT * FROM tags";
$result = mysql_query($sql_query) or die(mysql_error());
$result = mysql_fetch_assoc($result);

foreach($result as $res){
$res["tag"] = $tag;
$res["link"] = $link;
}
echo "Test".$tag;

$keyword_array = array(
$tag => $link,
);

How Can I Auto-save The .pdf?
i've gotten used to using the ezPDF class to create and stream a pdf.  Now i've encountered a project where I want the created pdf to be emailed rather than streamed to the browser. 

I'm comfortable enough with phpmailer to send the file if I can only figure out how to save the PDF.  The documentation for the ezPDF class mentions a function called ezOutput... but that seems to do the same thing as ezStream.

Auto Delete
This script was meant to delete a file after X days...in this case I wanted it to delete files that were older than 1 day except .htaccess. what the script is doing is deleting everything in the specified folders except htaccess even though the files are less than a day old. any suggestions? Code:

BB Code - Escape A Bracket In BB Code?
Is there a way to escape a "bracket" in BB code? The beginning of a bbcode
post I made starts with something in brackets [like this]. This causes a
strange thing to happen to the remainder of my post. Removing the brackets
makes my post normal. That shows me that I need to escape the brackets.
However, a simple backslash does not seem to do the trick i.e. this [wont
work]

I am not the administrator of the bb forum, just a poster. So I need to know
what to do on my end (as opposed to an adiministrator's power to
reconfigure, etc.

Translate Perl Code To PHP Code.
Can some one transfer this Perl into PHP? It is from the Spreadsheet-WriteExcel. PHP Code:

Get Last Auto-increment Number
I am inserting related data into 2 tables. The first table I insert into has an auto-incremented field. The second table i insert into has a field which needs to hold the same number as the number in the auto-increment field from the first table. I cannot auto-increment the field in the second table because the number will occur more than once in the second table.

How can I retrieve this auto-incremented number from the first table?

Pause An Auto-refresh?
I have a couple of php scripts running that allow users on line to
enter brief lines of text, chat style. When they are posting a line
of text and an auto-refresh command is executed, Internet Explorer
users lose the line they were in the middle of typing. I was
researching how to stop the auto-refresh if the form post box was in
use and found some reference to a "pause button" that can be placed on
the user side as HTML. Anyone know about this?

Auto-increment Field
I have query which returns the value of a auto-increment field last entered. That is:

$sqlquery = "SELECT MAX(field-id) from table";
$result = mysql_query($sqlquery);

The query itself seams to work fine alone, but when I run it in a php script and try to print $result it returns "Resource id #6" . No idea what this is or where it came from.

Auto-Increment And Deleting
When i delete a record from my MySQL database it works fine, but then when i reload the form to Insert another record, it sticks the record into the database but at the position where i deleted the record. Can someone show me a way of keeping the autoincrement at the last record in the database even after i delete a record?

Get Auto Number On Insert
i need to implement it in PHP so im posting this here. i have a table that auto numbers each row, and i need to get the primary key of each now row as it is added for further use.... for example: PHP Code:

How To Make Auto Run CD For PHP/ My SQL Project
How to make auto run CD for installation on Windows and Linux of PHP/My SQL project to any computer which already installed PHP & MySQL software.

MySQL Auto Increment
I have a site that is about to go into production
and it has a couple of tables that it uses that
could get quite large once in full swing, most of
them have a column called "id" and it auto
increments every time a new row is added. When
setting this up, what do you recommend using at
the column type and size. atm I have gone for a
big-int with the size of 20. I wonder over time
will 20 be enough... Should I just think of a big
number and use it?

Anyone else in this situation and what would you do?

Auto Linking To Html
Iam building a login form page in PHP that runs a PHP script. The form contains a $variable that passes to the script. Then I would like to direct automatically to the link below: http://www.$variable.com/login.htm What would the PHP command be to action the above link?

I Am Trying To Pipe In Some Auto-generated PHP Into Php.exe
I am trying to pipe in some auto-generated PHP into php.exe, to no
avail:

PHP / MySQL - Auto Increment Id
I just did my first PHP/MySQL database (a simple survey) that works
fine. It is ordered by an id field that auto increments. Apparently, one
entry repeated (I'm thinking the user hit the submit button twice). So,
I deleted a record. My question is, how do I make it so the next entry
will use the id# that I deleted, so there won't be a gap in the id numbers?

Problems With The Auto-index.
I'm setting up a guestbook using PHP and MySQL. It's set up to read one entry at a time. I would like to be able to delete entries if needed. The problem is that the auto_increment of the id continues where it left off, even if some of the entries have been deleted.....

The script that reads the entries relies on the id to find them in the correct order. So it creates 'blank' entries where the script tries to read id numbers that no longer exist.

I suspect that the solution might be to change the read script so that instead of reading 'the entry with id# ___' it reads 'the ___ entry in the table'. I just dont know how to set this up.

Auto Submit A Form In PHP
Does anybody know how to auto-submit a form in PHP without Javascript?

For instance, submit form variables to self, validate the data in PHP on
same page, then, if no errors, auto-submit the data via post rather than
URL. Could serialize a few fields to URL, but there is a larger comments
field that I think needs to be posted instead.

Auto-post the form variables possible?



Auto Update Database
Is it possible make auto update a local MySql database after a certain time period from internet MySqL database ...

PHP Htpasswd Auto Ammending
I have been trying for a few days now, with no success to automatically add members to a .htpasswd file using PHP, I have a signup page which asks for e-mail and a password, and then sends to a script to deal with the data. However, it seems i cannot get the information into the .htpasswd file, even after using the information previously posted in the forum.

As the info is to append to the htpasswd file. I currently have
$fp = fopen(".htpasswd","w");
$info = ($email':'crypt($pw));
fwrite($fp,$info);
fclose($fp);

where $pw is the password and $email the username.

Serverside Webmail Auto POP
I'm looking for a teeny webmail script that sits serverside that can check my POP3 mail automatically. The only purpose of this is actually to keep my SMTP open since my host has enabled the famous POP before SMTP.

Auto Generate A Number
I use an online ordering system. Is there a way to automatically generate a random 6+ digit unique number and also print the number on the confirmation page? I dont use mysql or any database. Here is the link for the actual page. You can go ahead and submit something (just use "Test" on the name field) Code:


Copyright © 2005-08 www.BigResource.com, All rights reserved