PHP,Java,SQL and Hello all

General discussions related to php

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Fri May 10, 2013 6:19 am

PHP,Java,SQL and Hello all

Postby otherside » Fri May 10, 2013 7:03 am

Hi all im new to this site and kinda new to all this coding/programming stuff, about 7 years ago i did have an attempt and didnt do to bad with a little help on php,java,sql.

modifying and making little add ons and changes to the old school source code after teaching my self on the go and being impressed with the site i had come up with, it was just a project so never made it online,

Anyhow i am now giving it ago again and feel as rusty as a nail left out,
What im trying to accomplish here is how to get this to save the input text
from createjob.php

Code: Select all

<li><p><label><b><?php echo $this->lang->line('City');?></b></label><input name="cityto" value="<?php echo set_value('cityto'); ?>"  size="30" type="text"/></p><?php echo form_error('cityto'); ?> </li>
<li><p><label><b><?php echo $this->lang->line('State');?></b></label><input name="stateto" value="<?php echo set_value('stateto'); ?>" size="30" type="text"/></p><?php echo form_error('stateto'); ?></li>
<li><p><label><b><?php echo $this->lang->line('Country');?></b></label><input name="Countryto" value="<?php echo set_value('Countryto'); ?>" size="30" type="text"/></p><?php echo form_error('Countryto'); ?></li>

and output it to viewjob.php

Code: Select all

<td class="dt1 dt0"><?php echo $this->lang->line('Location to');?></td>
                                  <td class="dt1"><?php echo ucfirst($job->cityto);?>, <?php echo ucfirst($job->stateto);?></td>

When i fill in the "Location From" details it displays on viewjob.php like

Location From: (the correct input data)
Location To; (PHP Error)

Code: Select all

A PHP Error was encountered

Severity: Notice

Message: Undefined property: stdClass::$cityto

Filename: job/view_job.php

Line Number: 296

Line 296 is the

Code: Select all

<td class="dt1"><?php echo ucfirst($job->cityto);?>, <?php echo ucfirst($job->stateto);?></td>

Hope someone can help, i do keep having a little play with no luck and just move on to something else to play around with, Its most likely something simple for the pros, but its got me lost haha.

If you need any more info just ask,
Thanks again for all the help given or advice, Hope to be around here for sometime getting and giving advice,

php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Re: PHP,Java,SQL and Hello all

Postby johnj » Mon May 13, 2013 2:22 am

you need to check the class file and make sure that there is a class variable or property called $cityto.

Return to “PHP General”

Who is online

Users browsing this forum: Google Adsense [Bot] and 1 guest