edit data from array

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kabucek
Forum Commoner
Posts: 50
Joined: Thu Sep 04, 2008 2:20 pm

edit data from array

Post by kabucek »

hi @LL,

i have $agreement in .php file
this holds text which I need to edit but I can't find it.
I tried:

print print_r and var_dump but it only display the data and
not where this is located.
how to find where actual text from $agreement is located?

thanks
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: edit data from array

Post by jaoudestudios »

Post the var_dump.
kabucek
Forum Commoner
Posts: 50
Joined: Thu Sep 04, 2008 2:20 pm

Re: edit data from array

Post by kabucek »

you want to post the output of the var_dump?
sorry I can't do that,
because its the agreement text
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: edit data from array

Post by jaoudestudios »

Well post an example of the results you are getting and the results you want. Because we dont understand what you mean!
kabucek
Forum Commoner
Posts: 50
Joined: Thu Sep 04, 2008 2:20 pm

Re: edit data from array

Post by kabucek »

I have register form where there is a box with agrement(terms and condition..)

- i want to change that text
- i want to change the policy which is in $agreement but I can't find where is the
file or whatever where it is.

here is the code:

Code: Select all

if (!$titleString)
 
                     {
 
                        $titleString="
 
                            Please check the box below to indicate that you<BR>understand and agree to the terms and conditions below:
 
                            <DIV style=font-style:italic;font-size:80%;font-weight:normal;><SPAN style=color:red;font-weight:600>*</SPAN> indicates a required field</DIV>
 
                            ";
 
                        }
 
                if ($recordDataArray['contractAgreedTime'] and $recordDataArray['contractAgreedTime']!=0)
 
                    {$checkedArray['contractAgreedTime']='checked';}
 
                    
 
                if (!$recordDataArray['contractAgreedTime']){$recordDataArray['contractAgreedTime']=time();}
 
                
 
                
 
                //myAgreement
 
                $agreementName=$priceSetArray['specialAgreementName'];
 
                if (!$agreementName){$agreementName=$defaultAgreementName;} //note: ...
 
                
 
                $agreement=stripslashes(getGenRef($agreementName));
 
                $agreement=processTemplateArray($agreement, $validUserRecArray);
 
                                
 
                $formTagString="
 
                    <TR><TD colspan=2>
 
                    <table width='507' border=0 cellspacing='0' cellpadding='0' class='paragraph'>
                    
                    <TR>
 
                            <TD colspan=3 class=header style='height:40px;background-color:rgb(255,255,255);border-bottom:10px white solid;'>
 
                                $titleString
 
                                </TD>
 
                            </TR>
 
                       <tr valign='top' bgcolor='#FFFFFF'>
 
                            <TD colspan=3>
 
                               <textarea cols=55 rows='15' name=tmp>$agreement</TEXTAREA>
 
                            </td>
 
                            </tr>
 
                        <tr valign='top' bgcolor='#FFFFFF'>
 
                               <td width='398' height='40' valign=middle align=left colspan=2 style=font-size:150%;><SPAN style=margin-right:25pt;>Agreed<SPAN style=color:red><em>*</em></SPAN>{$errorArray["contractAgreedTime"]}</SPAN><input name='recordDataArray[contractAgreedTime]' value='{$recordDataArray['contractAgreedTime']}' {$checkedArray['contractAgreedTime']}  type='checkbox' class='paragraph'>
 
                            </td>
 
                            </tr>
 
                         <tr valign='top' bgcolor='#FFFFFF'>
 
                    </TABLE>
 
                    </TD></TR>
 
                    ";
 
                $hiddenTAG.="<INPUT type=hidden name=recordDataArray[itemID] value='{$recordDataArray['itemID']}'>";
               
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: edit data from array

Post by jaoudestudios »

Oh I see. I thought you were trying to do something clever!?!

You did not right the code? And you dont know where the agreement text is stored?

What framework are you using?

Btw...the html is BS!

Try searching the whole framework for that variable/array
kabucek
Forum Commoner
Posts: 50
Joined: Thu Sep 04, 2008 2:20 pm

Re: edit data from array

Post by kabucek »

clever ??

this suppose to be 5 min work and its taking more than a week.

it was written by so many people that its messsss and no documentation,
This is tooo big to search through the whole framework.
there was at least 10 people changing this framework which makes nightmare to edit or find
something.

give some suggestions so i can my search a little faster.

thanks !
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: edit data from array

Post by jaoudestudios »

Why cant you just grab a bit of the text and search the whole directory for that text, then you will find the file containing that text to change - what a mouth full :)
kabucek
Forum Commoner
Posts: 50
Joined: Thu Sep 04, 2008 2:20 pm

Re: edit data from array

Post by kabucek »

Why cant you just grab a bit of the text and search the whole directory for that text, then you will find the file containing that text to change - what a mouth full


if this would be that easy i would not be posting question here,
don't you think ?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: edit data from array

Post by RobertGonzalez »

Do a search in your files for "$agreement =" to find where the assignment is.
Post Reply