428 Posted Topics

Member Avatar for jakx12

[code=php] $query = 'INSERT INTO user_notifications (`username`, `status` ) VALUES ("'.$username.'", "new to the site!" )'; mysql_query( $query ) or die( mysql_error() ); [/code] That is how I would handle the query, although the column names are not reserved words so they really dont need the backticks around them. [URL="http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html"]Here …

Member Avatar for mschroeder
0
162
Member Avatar for PinoyDev

Check out PHPMailer or Swift Mailer. I prefer the prior, but u simply set the FROM address(es) or name(s), REPLY-TO etc... Then when the user receives the email it looks like it came from whatever email or user you have specified. Both libraries make sending complex emails a lot easier …

Member Avatar for cwarn23
0
2K
Member Avatar for Aamit

[URL="http://www.blog.highub.com/apache/http-server/google-text-translation-using-htaccess/"]http://www.blog.highub.com/apache/http-server/google-text-translation-using-htaccess/[/URL] That is a very clever solution you have linked too. Designing a set of rewrite rules would depend entirely on how your urls are structured, and how standardized they are. The more uniform they are the easier it will be do setup. Can you provide an example(s) of the …

Member Avatar for cwarn23
0
2K
Member Avatar for FlashCreations

What you're describing sounds like you're looking for something like the [URL="http://us3.php.net/manual/en/language.oop5.overloading.php"]__call() magic method[/URL]

Member Avatar for mschroeder
0
121
Member Avatar for queenc

In the ops last post, they neglected a semicolon [inlinecode] <? echo $_SESSION["seekerid"]?> [/inlinecode] should have been [inlinecode] <? echo $_SESSION['seekerid']; ?> [/inlinecode] as illustrated in your response. However as a word of advice, php short tags should be avoided as there is no guarantee that they are enabled if …

Member Avatar for mschroeder
0
83
Member Avatar for gagan22

how about using some jQuery to simplify the code even further. [code=html] <html> <head> <title>test</title> <!-- Let GOOGLE serve the ajax library via their CDN --> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ //Run the hideall() function to hide all divs that have an id of divform //and are children of …

Member Avatar for mschroeder
0
140
Member Avatar for MSK 7

If you're familiar with what AJAX is this is a great way to switch form using jQuery. If you're going to go down the road I highly suggest you look at jQuery or Prototype as both provide great functionality out of the box. Now on to the code: Put this …

Member Avatar for death_oclock
0
126
Member Avatar for marcmm

For starters, if you name every field just like you have been, on the php side you will be able to access each individual file as a numerical array. Now for adding and removing the file fields dynamically i'll refer you to my favorite prototype tutorial, which i have posted …

Member Avatar for marcmm
0
211
Member Avatar for tyop

Lets see if i understand what you're trying to attempt. You have a physical xml file somewhere on your server, we'll call it file.xml and you have a php form. That should load the contents of file.xml and allow the user to add/subtract from it, and then a save button …

Member Avatar for mschroeder
0
118
Member Avatar for nishant52

If your server is configured to parse and display php files, using the .php extension, then the only thing the end user will see is the parsed output of the file.

Member Avatar for almostbob
0
121
Member Avatar for isotope

Why did you define push_array( $array, $in ) { array_push( $array, $in )} ? Unless you're unless you're planning to add additional functionality into push_array before you call [URL="http://us3.php.net/array_push"]array_push[/URL], you're just changing the name of a core function. [code=php] $n = 5; for($i=0; $i<$n; $i++) { array_push($array,$i); print_r($array); echo "<br/>"; …

Member Avatar for isotope
0
145
Member Avatar for emiola

[code=php] <?PHP $Surname = $_POST['Surname']; $OtherNames = $_POST['OtherNames']; $Dateofbirth = $_POST['Dateofbirth']; $age = $_POST['age']; $sex = $_POST['sex']; $Nationality = $_POST['Nationality']; $stateoforigin = $_POST['stateoforigin']; $Entryclassonrequest = $_POST['Entryclassonrequest']; $religion = $_POST['religion']; $parentsguardiansname = $_POST['parents/guardiansname']; $occupation = $_POST['occupation']; $phonenumbers = $_POST['phonenumbers']; $whomchildliveswith = $_POST['whomchildliveswith']; $previousschool = $_POST['previousschool']; $imunizationdetails = $_POST['imunizationdetails']; $target_address = 'info@uniqueeducationltd.com'; …

Member Avatar for mschroeder
0
138
Member Avatar for cosby
Member Avatar for mschroeder
0
65
Member Avatar for Book38

for starters its not encoded perse, its simple obfuscated. If you start working backwards and doing some find and replace you'll see it translates right back to php. [code=php] <?php if (!function_exists("copyright")) { function copyright($a) { $a = base64_decode($a); $b = 0; $c = 0; $d = 0; $e = …

Member Avatar for ShawnCplus
0
117
Member Avatar for mrcniceguy

Why are you trying to use FTP with move_uploaded_file() ? Are you trying to place the file on a server that is different then the one you are uploading too?

Member Avatar for mschroeder
0
113
Member Avatar for rajeesh_rsn

Well the only glaring issue I see is, you lack the ability to tell if the user is logged in once they leave the page. [code=php] <?php //process.php session_start(); $username=$_POST['username']; $password=$_POST['password']; if ($username=="some" && $password=="some") { //Username & Password match //Set a session value so we know they were logged …

Member Avatar for mschroeder
0
66
Member Avatar for Lensva

in you functions you add string data to $_SESSION['error_list'] instead of actually making $_SESSION['error_list'] an array of multiple errors. Then when you call foreach it is not finding an array because one does not exist. Try adding [] after each place where you add error data to the error_list session …

Member Avatar for Lensva
0
229
Member Avatar for rajeesh_rsn

Assuming you cant or dont want to use an auto-incrementing value, I would suggest maybe using a UUID if length is not a concern. PHP lacks direct support, but they can be generated automatically via mysql. [URL="http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_uuid"]http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_uuid[/URL] Although personally i think they are atrocious to look at and have to …

Member Avatar for rajeesh_rsn
0
101
Member Avatar for queenc

use the paste from word functionality provided in TinyMCE, It may need configured if you dont have an icon that looks like a clipboard and a word icon.

Member Avatar for mschroeder
0
67
Member Avatar for cali_dotcom

unless your site has a constant consistent flow of traffic, cron (nix) / Task Scheduler (windows) would be the only way to accurately do this. On windows you would need to use the task scheduler. [URL="http://www.sugarcrm.com/wiki/index.php?title=Scheduling_cron.php_to_run_on_Windows%2C_Linux_or_Mac_OS_X"]http://www.sugarcrm.com/wiki/index.php?title=Scheduling_cron.php_to_run_on_Windows%2C_Linux_or_Mac_OS_X[/URL] This is specific to SugarCRM's setup, but the concept is really easy and you …

Member Avatar for mschroeder
0
521
Member Avatar for kuldeep04

I assume what you want to be able to do is have someone be able to select a color code, or maybe something as simple as red, blue, green, etc and then return images from your database that contain a large percentage of that color. I have never seen this …

Member Avatar for mschroeder
0
125
Member Avatar for smartness

unless the files are first encoded, then anyone with an understanding of the language would be able to audit the code and remove the function if they didn't want it occurring, or in some case were using your code without paying for it etc.

Member Avatar for mschroeder
0
345
Member Avatar for theimben

steer clear of the eregi_* family of functions as of 5.3.0 they are depreciated. You should be using the preg_* functions instead [URL="http://us3.php.net/preg_replace"]http://us3.php.net/preg_replace[/URL] it looks like you're trying to read through the source code and replace whatever is between the ad comments with a new ad, but without seeing the …

Member Avatar for mschroeder
0
176
Member Avatar for jeffc418

In the file you are reading the data from, is each person on their own line? Example: Last Name, First Name Phone: (H) ######## Birth:##/##/#### ...Patient Last Name, First Name Phone: (H) ######## Birth:##/##/#### ...Patient Last Name, First Name Phone: (H) ######## Birth:##/##/#### ...Patient or do they all wrap together …

Member Avatar for death_oclock
0
424
Member Avatar for mgn2683

$team and $section are php variables. aka [code] $team = 1; $section = 'A'; $query = 'SELECT * FROM assignment WHERE assignment.Team = '.$team.' AND assignment.Section = "'.$section.'"'; [/code]

Member Avatar for Aamit
0
149
Member Avatar for khr2003

[CODE=sql] SELECT forum.title, comments.comment FROM forum LEFT JOIN comments ON ( forum.id = comments.thread_id ) WHERE comments.userid = $iUserID AND forum.id = $iForumID [/CODE] this would yield something like this: +---------------+------------------------+ | title | comment | +---------------+------------------------+ | Forum Title | Comment text #1 | | Forum Title | Comment …

Member Avatar for mschroeder
0
287
Member Avatar for lydia21

I would generally caution against fckEditor for its lack of MS-Word support. Other than that it runs pretty neck and neck with tinyMCE. tinyMCE however has a wonderful paste from word feature that really does an excellent job of stripping all of the crap markup from the input. If you …

Member Avatar for lydia21
0
213
Member Avatar for only_anu2005

There are two ways that I am aware of to do this. The first would be to use apache's mod_rewrite, which will basically take domain.com/username and actually reference the url domain.com/?uname={username}. There is a lot of available information via google or the like. The other option would be to create …

Member Avatar for mschroeder
0
400

The End.