veedeoo 474 Junior Poster Featured Poster

Sure that's pretty easy I think... you can even let your user log in on either site. That is just my assumption of course. I did an integration with phpbb before, but it has been a while since. However, I still have the barebones of the script I wrote to integrate little application with the phpbb.

I am looking at a general log in function on the other section of your site, so that they don't have to really be in the forum logging in , and go to the other section of the site to just get validated through the prevailing session from the forum. How about if we do it like this..

On the other section of your site --> we create a log in script -> Upon submit of the form -> user gets validated on your phpbb log in sytem -> if a valid user, the user is then re-directed to the section of your site, where the login attempts was originatin from.

You can then modify the script as you like, but first I want you to see how the integration really works to have the complete view of what is really taking place. After this, you can definitely do whatever it pleases you.

NOTICES and ASSUMPTIONS: I am assuming here that your forum directory is located at YourDOMainDotCom/forum .. Of course you are free to modify the codes for your needs.

STEP ONE : copy codes below and save as other_page.php . This file …

veedeoo 474 Junior Poster Featured Poster

What forum script is running on your site?

veedeoo 474 Junior Poster Featured Poster

Hi,

You can read Christopher's tutorial about flat file Here. The guy is really good in flat file manipulation. A very unique approach.

veedeoo 474 Junior Poster Featured Poster

Hi,

Just a question, you mean your supervisor can't tackle this stuff? I am keeping my fingers crossed from now on. I hope I don't work for someone like that after college, or else I will put her in the recycling bin.. Boy, that was a pretty sick thoughts I have, I am just joking of course..

HINT! Since I don't write codes for advance users... sometimes I do, but on a very rare occasion, when they already put a lot of efforts on the table.

You may want to start something like this

RewriteRule ^aboutus/?$ index.php?id=$1 [L]

**$1 ** is not a php variable as we all understand about it, but it is rather a local variable when placed on the .htaccess. Therefore, the id=1 to id=22 are beautifully catched I assumed.

veedeoo 474 Junior Poster Featured Poster

ERRATA!

I jus realized that I made a mistake on both of the script above. Find

$fh = fopen($myFile, 'w') or die("can't open file");

And then change it to this..

$fh = fopen($text_file, 'w') or die("can't open file");

You must change it on both files the first test, and the pdf creation test.. I really have to go to school.. Let me know how did it go. I don't the chance to test the script...

veedeoo 474 Junior Poster Featured Poster

Just to make it safe for you at school, you need to take a look at the class instantiation, so that when people ask you what just happened, you will have an idea at the least broad idea on what just have taken place in the script.

Don't hesitate to change the header function, you can always extends the class whatever you want with it. My sample codes above is the most feasible and simple.. using some of the php codes already existed and demonstrated by the author of the fpdf class author, provided us with a working template.

The text file method is a lot easier on your server, than going into the while loop and then feeding those data to the fpdf class. With the text file being created first, server resources are freed right after the text file has been created, and then the fpdf instatiation will immediately takes place.

veedeoo 474 Junior Poster Featured Poster

Hi,

Just like what Joshmac has said. You need to move few steps back for a moment and then forward if everything on the php side is confirmed to be working.

To do this, we need to check and make sure we are getting something on the screen as output from the script. Ignoring everything from the fpdf class, lets do this first.

Copy codes below and save it anyNameYouwant.php . Put this file in your localhost

<?php

  function simple_func($sql){
  ## define your database connection credentials
 $db_host = "localhost";
 $db_user = "YOUR_DATABASE USERNAME";
 $db_password = "YOUR DATABASE PASSWORD";
 $db_database ="YOUR DATABASE NAME";

 $conn = mysql_connect($db_host,$db_user,$db_password) or die(mysql_error());
 $db = mysql_select_db($db_database,$conn)  or die(mysql_error()); 
 $result = mysql_query($sql, $conn) or die(mysql_error()); 

 ## And we pulled the results 
 while($row = mysql_fetch_array( $result )) 
{
$data[] = $row;
}
## we return the data

 return $data;

 }
$text_file = "testFile.txt";
$fh = fopen($myFile, 'w') or die("can't open file");

$sql = "(SELECT * FROM lifeplan )"; 
$pdf_data = simple_func($sql);
foreach($pdf_data as $info){

$stringData = $info[1]."\n";
fwrite($fh, $stringData);

}


fclose($fh);

After running the script, it should create a text file named testFile.txt. Is the text file created? Ans: NO-> check your database creadentials and make sure they are filled in properly.. Yes-> copy codes below and run the actual pdf creator.

If you can see the actual text file created above, we need to run a second test to confirm that fpdf.php class is working on your side. Save codes below anyNameYouWant.php

<?php
 function simple_func($sql){
 ## …
veedeoo 474 Junior Poster Featured Poster

I will look at your codes tomorrow. Been looking at two many codes all day.. I am pretty sure it is just a minor error. I once used this class to generate pdf, and I have never encountered such problems.

Will be right back ..

veedeoo 474 Junior Poster Featured Poster

Hi,

Try this.. open your notepad or any suitable php code editor. Paste codes below

ErrorDocument 404 /404.html 

Save the above as .htaccess , and then upload to your server.

Second step..
On your notepad again or html editor, create a new page similar to the google 404 page and name it 404.html

upload the 404.html to your server.

That's about it...

veedeoo 474 Junior Poster Featured Poster

Hi,

Try correcting your query to this

$str = "SELECT contractno,sname,fname,mi,dob,applno,cpnum,eadd WHERE ((contractno='".$contractno."')AND (sname='".$sname."') AND (fname='".$fname."') AND (mi='".$mi."') AND (dob='".$dob."') AND (applno='".$applno."'"));
veedeoo 474 Junior Poster Featured Poster

Hi,

Double check that your app/Config/database.php is properly filled up with your database credentials. You need to fill up two of them like so..

class DATABASE_CONFIG {

    public $default = array(
       'datasource' => 'Database/Mysql',
       'persistent' => false,
       'host' => 'localhost',
       'login' => 'root',
       'password' => '',
       'database' => 'cake',
       'prefix' => '',
       //'encoding' => 'utf8',
     );

    public $test = array(
       'datasource' => 'Database/Mysql',
       'persistent' => false,
       'host' => 'localhost',
       'login' => 'root',
       'password' => '',
       'database' => 'cake',
       'prefix' => '',
      //'encoding' => 'utf8',
   );

If that does not do the trick, try writing a simple database connection script and use the same credentials as you have for your cake php. Something like this

<?php
 $db_host = "localhost";
 $db_user = "root";
 $db_password = "";
 $db_database ="cake";

 $conn = mysql_connect($db_host,$db_user,$db_password) or die(mysql_error());
 echo "connected to your mysql<br/>";
 $db = mysql_select_db($db_database,$conn)  or die(mysql_error()); 
 echo "connected to ".$db_database;

If the two options above do not make the cut.. Dump the WAMP, and try XAMPP.. Running this XAMPP on any thumbdrive. I have Zend, Igniter, and CAKE. I am running them on the same thumbdrive powered by xampp.

For my linux box, I am also running xampp with Zend, Igniter, Cake, and ffmpeg php with all the trimmings and dlls...More likely it is the WAMP that is faulty..

veedeoo 474 Junior Poster Featured Poster

Just a humble reminder, they don't allow double posting of the same question like the one you posted Here

The reason is that, it is really hard to track questions being posted here on a daily basis... I mean lots and lots of them with different flavors and colours... :)

veedeoo 474 Junior Poster Featured Poster

Ok, I am back to tackle this. Please bear in mind that my style of coding is somewhat different, but it will make a lot of sense if given the proper analysis logic wise. My head is always wired like this -> logic ->View -> template system.

Since there is no way for me to teach someone how to work on php frameworks and templating system in this short of time, I will be using the same coding techniques I have implemented when I was 13 years of age, and when I was barely learning how to write php programs. Even after 6 years, I am still surprised on how my mindset able to creatively do this.

I am hoping that this technique will help the new comers in php language. Although it is not perfect, I truly believe this will truly help people how to organize their codes.

**!WARNING AND DISCLAIMERS! **This script is not sanitized.. I want you to do it yourself, for you to gain an actual experience on sanitizing data for database query. I also don't give or extend any warranties for this script. The final version of this script must be all based on your own server environment.

Here we go..

STEP ONE:

On your localhost create 2 two directories. Name these directories as includes and template

STEP TWO:
Copy codes below and name it index.php or whatever name you want.

filename: index.php or whatever.php

<?php
    ## This is sample script written by PoorBoy …
veedeoo 474 Junior Poster Featured Poster

Hi,

Okay, please hang in there,.. I will re-write your codes.. Check back later. The demo I have provided is based on ajax, where there is no page reload on submit. Since you want to send the browser to a new page, then my example is not going to work. It will only work if javascript is disabled. I already provided this option on the demo page.

and, this should not be placed inside a loop e.g. for, foreach, while, etc..

if((isset($_POST['save'])) && (!empty($_POST['radio']))){
echo ($_POST['radio'])."<br/>"; // how can print topic and author and date ?? 

Let me just finished what I am currently doing and I will get back to this question ASAP.

veedeoo 474 Junior Poster Featured Poster

Dude,

I am so happy for you.. It is always a good habit to back up database. For people who are just lazy doing it on phpmyadmin panel. You can also do this behind the putty terminal. Assuming that your hosting account has a root access with it or the account is allowed to access through SSH terminal like putty.

Run putty.exe for windows and accessories->terminal on linux. On the terminal prompt type

mysqldump --opt -u DatabaseUsername -p DatabaseName > dataBaseName_dump.dump

Give your server an ample time to execute the command, and then open your FTP program like the filezilla. Connect to your site and look for the dataBaseName_dump.dump, download this dump file to your desktop. For linux distros like ubuntu or Zorin Os, this can be done by just opening the terminal and then run the following command

sudo -s 

System will ask for your password, type password and then type

cd/Desktop

Then to download the file from your site type

wget http://YourDomainDotCom/dataDaseName_dump.dump

That's pretty much it.. good luck on making back up and linuxing .. :)

veedeoo 474 Junior Poster Featured Poster

Server problems, it will be in the hands of your hosting company. Let's just hope they are doing a daily back-up. Otherwise, let's just cross our fingers, and hope that all the data are still there upon recovery. If you are running your own server, the data is located in mysql/data directory. I am not sure how it would look like in linux... let me run my linux box and see..

veedeoo 474 Junior Poster Featured Poster

The best way is to log-in to your cpanel and then go to phpMyAdmin, on the top menu click "export", on the export method option, select sql click go, at the prompt confirm the download. Save your sql backup file on your desktop.

Prgrammatically, don't even bother it is just too slow. I don't know, maybe someone have a faster way of creating back up by way of php that is fast enough for me to get excited.

veedeoo 474 Junior Poster Featured Poster

What I meant was base_64 not md5.

veedeoo 474 Junior Poster Featured Poster

Hi,

You should use md5 for the RecordID, before using it on the url. For example

$id = base64_encode($row['id']);
## then your url will be llike this /editprop/RecordID=<?php echo $id;?>

## to parse this info. by way of $_GET['RecordID'], you need to decode it like so

$processed_id = base64_decode($_GET['RecordID'];

By using this simple method, at the least the 15 is encoded and not showing the true integer value. You can also add another item in the session just to double confirm.

To find out if the RecordID is the user's own ID, you must confirm it by sending a database query matching the username from the session, and then if it confirms , give the user the rigth to edit.

veedeoo 474 Junior Poster Featured Poster

Here is the daniweb pagination search result, they got bunch of them http://www.daniweb.com/search/query/pagination/0?q=site%3A*%2F+pagination

veedeoo 474 Junior Poster Featured Poster

Run a phpinfo() , and look for your server's API value. If it says, apache module or anything referring to apache, CHMOD the directory where the written files are saved to 0777 or 777. If the server's API says CGI or fast CGI, CHMOD it to 0755 or 755. If the CHMOD 077 or 777 is used, try searching on how to protect your directory in .htaccess file, so that only your script can write to it.

veedeoo 474 Junior Poster Featured Poster

Here is a Sample similar to what you are trying to achieve. Just view the source code of the page and it is pretty much self explanatory. I am experimenting with the jquery chained link plugin. Please do not hotlink the jquery files. That's all we are asking. please play by the rule..

veedeoo 474 Junior Poster Featured Poster

Just like what CoursesWeb suggested, jwplayer is your best choice. Another one is flowplayer both players supports pseudo-streaming by php and RTMP streaming. Depending on video extensions you currently have on your site, you can either decide which one to use. If you site's videos are flv either one can do the job equally. However, if the video extension is mp4 the best choice will be jwplayer. JWplayer can pseudo-stream mp4 files without the need of h264 streaming modules. All there is need to be done in mp4 preparation is to move the moov atom of the video.

Jwplayer has also a great javascript API which enables you to do a player targeting just by clicking on the thumbnail the video will load opn the player without page reload which mean a saving on bandwidth ( not much, but will add up later on). Please take a look at my Demo Here , and feel free to copy the source code for your need. The only thing I must beg you not to do is hot linking the jquery and player files from the source. The site hosting the playe and jquery files belongs to my brother and he works for google. If finds out that you are hotlinking his files, he can do alot of things to make your site a little bit miserable. Trust me they can do that, but at the same time we don't mind sharing things like codes as long as people knows …

veedeoo 474 Junior Poster Featured Poster

Don't forget to sanitize all of the form submitted data, before adding them to your database.

veedeoo 474 Junior Poster Featured Poster

ok here is the Demo .. Please feel free to look at the page source. The demo is a barebone.
Here is the code for the processor, pleas feel free to expand it to your requirements including database inclusions.

<?php
## this is for the ajaxform processor
if((isset($_POST['send_button'])) && (!empty($_POST['desc']))){
    echo ($_POST['desc'])."<br/>";

    ## this is where you put your database query


}
else{

    echo "You must select one option";
}
?>
veedeoo 474 Junior Poster Featured Poster

Yes, tomato is a fruit. Included in dicotyledon fruit group along with apples, plums, pears, oranges and few others.

veedeoo 474 Junior Poster Featured Poster

Thanks, please check the simulator again. I made it to be able to send the data array to TWO remote servers.

Local server send data to server two --> server two sends data to server three, and response back to server one --> Server Three process the form and then respond to server two. Server two will relay the response of server Three back to server one.

Statements Below are NOT question Related:
I wrote another version of this script to move bigger files across servers.. actually it is called server load balancing, where the function is to protect the server load and space limit of an ffmpeg capable VPS server, the encoded video is then transported across the web to the site's owners other domain, at the speed of about 5MB/sec maybe faster than this, because 100MB video can be transported to two external server in less than 3 seconds, both external have the same copy of the video. The validation is pretty strict, so the remote processor must check the 200 characters salt coming from the first server.

veedeoo 474 Junior Poster Featured Poster

ok, I gave your question a much effort and considerations just to show how the remote form processor through cURL works. Here is my sample script sending a form data array to a remote server. One server is located in Nevada (this is the local form) and the data will be process in Texas (remote server). The remote server (Texas), will then response with confirmation including the boolean value.

You can try the simulator Here

The demo validates cc number to integers only..

veedeoo 474 Junior Poster Featured Poster

Hi,

Show us the layout of your cURL and I will help you. I could have write it here for you, but I don't write codes for advance user. I don't want to deprive anyone the fun of learning on top what they already know. Show me some codes and I will help you out.

For students inquiries, I am always glad to write some codes for them. For advance users, they got to have some codes on the table where we can start to build upon.

Hint: Ask the ccs provider how the form is process. e.g

$_POST['fname']; $_POST['name'];

veedeoo 474 Junior Poster Featured Poster

Hi,

You can also look at the form validation class in system/libraries/. Class definitions and functions are explained Here. Either extend the class as shown in this example, or set new rules

$this->form_validation->set_rules();.

I remember bumping into this problem two years back, but I can't even remember how and which files we have to tweaked. I will ask my brother Michael though to see if he ever remembers.

veedeoo 474 Junior Poster Featured Poster

I missed the product part. You must do the on the product. The main key here are the database tables and columns. Sorry about that.... :)

veedeoo 474 Junior Poster Featured Poster

First, take a look at the database table for the client, look for the column names. On the other site (NOT Magento, because I have not installed this script NOR I tested one), this could be any script right? Let the second script connect to magento database and extract the client table. If the second script is located in the remote server, the server where the magento resides must give permission to access. This can be done in the cpanel.. make it domain authorized and not the IP address. However, if the remote site has its own IP address dedicated ONLY for this site, then IP can be use instead of the domain name.

The second script database query must be bridged to the magento database... meaning you only query based on the magento's database client table columns. So, if the client table columns are id - name - last - username - password . The second script must use these information for query. The product on the second script can be different or have its own database. You can also bridged the registration processes on the second site, by submitting the newly registered user to the maegento's database. WARNING! if doing the bridged by either log-in and registration... I mean user password validation, you need to check on magento's pasword hash or encryption for the password.. If it is an MD5 hash then the second site must use this hash for adding new client and for validating the client's …

veedeoo 474 Junior Poster Featured Poster

We need to see your target xml file. It all depends on your xml file structure. There are several methods in parsing xml file. It all depends on the target document.

veedeoo 474 Junior Poster Featured Poster

Hi,

if this-> $sysid is a php variable, then try changing your code

<a href='delete.php?id=$sysid' class='view' onClick='del()'>
<img src='image/vie.png' border='0'>
</a>

to this

<a href='delete.php?id=<?php echo $sysid;?>' class='view' onClick='del()'>
<img src='image/vie.png' border='0'>
</a>

veedeoo 474 Junior Poster Featured Poster

@faisals701,

Here is a classic example of $_REQUEST vulnerability, if NOT properly PROTECTED.. Copy codes below and upload to your localhost. You can name it anyNameYouWant.php. Regardless of the form method use as long as it not protected, it will have the same vulnerability as to no method at all by way of REQUEST processing.

<?php
$method_one = '<form method ="POST" action ="">';
$method_two = '<form method ="" action ="">';
$method_three = '<form method ="GET" action ="">';

if (isset($_REQUEST['submit'])){
	$name = $_REQUEST['name'];
	$nickName = $_REQUEST['nickname'];
	
	echo $name."<br/>";
	echo $nickName."<br/>";
}
else{
 ## uncomment ONE method at a time here
 
 ## uncomment method one to test POST
 //echo $method_one;
 
 ## uncomment method two to test either method
 echo $method_two;
 
 ## uncomment method three to test GET method
 //echo $method_three;	
?>

<label>Name</label>
<input type = "text" name = "name" value ="" />
<br/>
<label>Nickname</label>
<input type = "text" name = "nickname" value = "" />
<br/>
<input type = "submit" name="submit" value ="submit"/>
</form>
<?php
}
?>

To test uncomment the $method_WhateverNUmberHere, comment out the one that you don't need to test.

Run the script on your browser, and try to test all the options -> $method and closely observe how the script will handle each $option. To make it a lot easier for everyone, if the method $_REQUEST isn't defined will default to $_GET effect. Meaning, if method is assigned like this method = "" (blank) it would have the same effect as method = "get".

For example, …

veedeoo 474 Junior Poster Featured Poster

Is the admin and the user logging in from the same terminal or desktop? Does the admin updates info. by logging in as the user by way account over-ride?

If your case is neither of the things I mentioned above, then you may want to add another column on your database and call it IP so that when people logged in you can also record the IP as a secondary confirmation for the user to accessing the account.

The only thing this may not work if the admin is logging in as user with the admin over-ride. Of course, the first session will be gone and the latest session will be the one showing..

veedeoo 474 Junior Poster Featured Poster

Hi,

PHP will not be able to check the file size before the file upload is executed. There is no way you can detect on the desktop's directory. File upload has to occur first, and then the script checks on the file size..

There is another way of doing this.. it is called flash dependency class.. try searching filereference class, externalReference class... that should work for what you are trying to achieved.

If you use the flash dependency, you must use this responsibly and only for the purpose of serving the file size detection function and upload function. This can throw many security holes on the desktop side.

veedeoo 474 Junior Poster Featured Poster

Hi,

Is this for the faculty and student views? If for both, the student can easily spoof your form, and they can have 100% grades on all of the terms prelim, midterm and finals..


Just my humble advice :). Show the grades to student as text string and NOT on the form system. Provide them with the calculation link using jquery to calculate the grades. The jquery will then print the grades on the targeted div.

Also when calculating isolate each variable and constant with parenthesis.. eg. ((value1 * value2) + (value3 * value4))..

veedeoo 474 Junior Poster Featured Poster

Hi,

Your upload script is highly susceptible for malicious script upload e.g. php script. You need to define the file extension you are willing to accept from user. The script above of which you have presented us can take any file extensions.

1. Your script could either use javascript to validate the file extension, before even executing the file upload.

2. Once the file extension is confirmed to your allowed file extension, you execute the file upload.

3. Once the file is uploaded in the tmp directory of your sever, this has to be process by adding a codes similar to what I have below..

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
    echo "This file ".  basename( $_FILES['uploadedfile']['name']). 
    " has been uploaded <br/>";
} else{
    echo "Oooppssy there was an error uploading the file, please try again!";
}

Please don't take your guard down when it comes to uploading.. it is so easy to upload script that can ruin your site. Most importantly, if there are database connection involve on form submission, this can even multiply the security risk on your site.

veedeoo 474 Junior Poster Featured Poster

@faisals701,

You need to change $_REQUEST to $_POST.. Anyone can send a remote upload on your form if that's how you are going to process it.

For added security, a unique ID should be auto generated by your script and plugged it in in your session..

Example of a unique id generator

$uID = md5(uniqid (rand(), true));

Re-validate $uID, before finalizing your upload ( this is when you actually rename, move the file, save data into your database.

veedeoo 474 Junior Poster Featured Poster

I just want to let you know that I just tested codeIgniter in my thumbdrive and it is working pretty well as I thought it would be.

The latest codeIgniter ( I have not run codeIgniter for two years now). I am impressed with the latest Version 2.1.0, because it is already loaded with Template Parser Class by default.

Meaning that you can easily create an application without any php codes in your view files.

Example -> Normally, people would go this route..

<!-- this is the html file on the view side -->
<body>
<h1><?php echo $title; ?></h1>
<div id="content"><?php echo $content;?></div>
</body>

With the template parser , template parser can be easily called like this

$this->load->library('parser');

$content_forTheview = array(
            'hstring' => 'This is string for H1',
            'viewContent' => 'This is the very cool content for the view'
            );

$this->parser->parse('indexTemplate', $content_forTheview);

then the new view file (indexTemplate) will look something like this.. it is kind of the same as smarty but for what I have read it is lighter.. The parser can also handle multidimensional array.. from database or wherever..

<!-- this is the html file on the view side -->
<body>
<h1>{hstring}</h1>
<div id="content">{viewContent}</div>
</body>

So the benefit of running the template parser class is that you can give your view files to anyone to work on the design or whatever, without the worries about your codes breaking in the hands of others.

Please check out their website.. the new codeIgniter comes with many …

veedeoo 474 Junior Poster Featured Poster

Please allow me to add something. Since that the php closing tag is already in placed .. shown below.

?>
<tr>
<td width="250px"><?php echo '<a href="ProfileDoctor.php" style="color:#33FF00;">$dname</a>'; ?></td>

it can be rewritten as this

?>
<tr>
<td width="250px"><a href="ProfileDoctor.php" style="color:#33FF00;"><?php echo $dname; ?></a></td>

Still the same as above, remove the inline css and move it to external css file..

veedeoo 474 Junior Poster Featured Poster

Just my thoughts about your school. I think programming should be systematic, most importantly if it is being teach in academic environment.

Internet is an excellent resources, however the basic foundation of programming should be propagated within the classrooms first, and then external resource can build upon this foundation learned.

About your project,,, here are my say about it. For the daily time record. You script should be able to record or capture the time the faculty and staff logged in the time clock system. Hint: time()... and the time logged for the break time, and time out.. you should be able to capture those hours by the same time ().

For example, faculty log on into the system --> record the time()--> faculty log out --> faculty log on again for his break time to clock out --> faculty log back on again returning from break--> Faculty log back on again for the end of the day --> end of script.

Total hours the faculty members and staffs work during the day

(First hour + second logged in) - (Second Looged in + third logged in) + ( third logged in and final logged out for the day).

Database entry views of your program if scripted based on my visualization

time1,time2,time3,time4...etc.. You can use the truncate function to separate the hours, for your calculation.

How to check for tardiness of the lazy professors.. check if time1 is less than the beginning …

veedeoo 474 Junior Poster Featured Poster

Hi,

You can read more about it here..

veedeoo 474 Junior Poster Featured Poster

By the way, back to your original question.. You can run either cake, igniter, and symfony in your thumb drive using an xampp..

Download xampp form apache and friends.
Extract the zip exe file, and then move all of its contents to your thumb drive.
To start xampp locate the xampp_start and click on it.

To run the phpCake or either of those I have already mentioned above, download the source from its provider.

Unzipped the Cake sources, and then move them to your thumbdrive/xampp/htdocs directory.

Follow the installation guidelins provided on the cake website. For the database credentialsm, Xampp have a default database user.. for the user, use "root", and password use "".

If cake php cannot create its own database, you need to create them manually by directing your browser to localhost/

click on the phpMyAdmin, and then create your database table for the cake..

That's pretty much it.. don't forget to change the salt if you will be uploading it to production server..

veedeoo 474 Junior Poster Featured Poster

Good to hear you have strong OOP concept.. you shouldn't have any problem with the transition.

I hate recommending Zend framework, but if you will be using framework as part of your resume, then I think you are better of with the Zend framework with certification. I know it is very expensive, but that will make you something special on the paper at the least.

However, if you are just trying to explore frameworks, the most common, popular and probably the most easy to get support is either cakePHP , symphony or codeIgniter. Both cake and igniter can work effectively with smarty, while the symphony can work with twig.

I tried all of them, actually I spent all of my school monthly allowances for 3 months on Zend certification, because it is an standardized approach.

However, outside Zend my take will be phpCake or CodeIgniter there aren't too many push and pull on their differences. Having said this, If you will be writing some big applications in the future, CakePHP can probably thrive with you. Of course, if you can tackle the Zend framework that would be an excellent choice not only for personal development, but also for a professional career .

Don't get confused with other people are saying. Some will tell you how great is the cake, while the others will tell you codeIgniter is the best, and Zend is the far most superior. The best thing you can do if these too …

iamthwee commented: good stuff +15
veedeoo 474 Junior Poster Featured Poster

Hi,

Look for line 72 grade.php

$$key = $value;

it should be

$key = $value;

Try using some PHP IDE like netbeans or eclipse... others settled in for advance php editor like personal php designer 2007. The good thing about them, they are all for FREE.. Load your entire script as new project to either netbeans or eclipse.. IDEs will at least look for errors and warnings found on the script. This can truly help in minimizing errors while writing codes.

veedeoo 474 Junior Poster Featured Poster

Hi,

Something is wrong with these echoes..

echo '<tr><td class="rows">'; echo $origin_description; '</td></tr>';
echo '<td class="rows">'; echo $destination_description; '</td>';
echo '<td class="rows">'; echo $date = $res; '</td>';
echo '<td class="rows">'; echo $time = $res; '</td>';
echo '<td class="rows">'; echo $fare= $res; '</td>';
 
echo '</tr>';

it should be something like

echo '<tr><td class="rows">'.$origin_description.'</td></tr>';
echo '<td class="rows">'.$destination_description.'</td>';
echo '<td class="rows">'.$date = $res.'</td>';
echo '<td class="rows">'.$time = $res.'</td>';
echo '<td class="rows">'.$fare= $res.'</td>';
 
echo '</tr>';

And these

echo '<td class="rows">'.$date = $res.'</td>';
echo '<td class="rows">'.$time = $res.'</td>';
echo '<td class="rows">'.$fare= $res.'</td>';

Although it will get outputted , it is not standard. It should be define before echoing them. Your codes will look nice and well organized.

ADDED LATER on EDIT

The above should be changed to these, because the values has already been assigned from the query results.

echo '<td class="rows">'.$date.'</td>';
echo '<td class="rows">'.$time.'</td>';
echo '<td class="rows">'.$fare.'</td>';

OR to these

echo '<td class="rows">'.$res['date'].'</td>';
echo '<td class="rows">'.$res['time'].'</td>';
echo '<td class="rows">'.$res['fare'].'</td>';
veedeoo 474 Junior Poster Featured Poster

Dude,

Cake php is the sweetest of all cakes, but its a hard one to bake second to Zend. You may want to do more research and study more about it. This thread will not have enough space to explain how it works.

veedeoo 474 Junior Poster Featured Poster

don't forget to trim the new_data..

$birdName = trim($new_data[0]);
$birdId = trim($new_data[1]);