/    Sign up×
Community /Pin to ProfileBookmark

PHP 5 code is not working with PHP 4.2 ???

Hello,

I am developing a product carlogue.for testing on local m/s i am using PHP 5 / APche / Mysql 5 combination.
The code is like this..

[code=php]
<table width=”100%” border=”0″ align=”center” class=”prod_showhide”>
<tbody>
<tr>
<th class=”tbl_blue_bg”><a href=”#”>Product Description</a>&nbsp;&nbsp;&nbsp;
<input type=”button” name=”Button” value=”Edit” onClick=”MM_openBrWindow(‘edit_para.php?mode=edit&productid=<?php echo $ProductID; ?>&fieldname=str_prod_description’,’Ed’,’width=600,height=600′)” class=”btnsty” /></th>
</tr>
<tr>
<td class=”block_content”><?php echo $str_prod_description; ?></td>
</tr>
<tr>
<th class=”tbl_blue_bg”><a href=”#”>Composition</a>
<input type=”button” name=”Button2″ value=”Edit” onclick=”MM_openBrWindow(‘edit_para.php?mode=edit&productid=<?php echo $ProductID; ?>&fieldname=str_prod_composition’,’Ed’,’width=600,height=600′)” class=”btnsty” />
</th>
</tr>
<tr>
<td class=”block_content” ><?php echo $str_prod_composition; ?></td>
</tr>
<tr>
<th class=”tbl_blue_bg”><a href=”#”>Therapeutic Effects and indications</a>
<input type=”button” name=”Button3″ value=”Edit” onclick=”MM_openBrWindow(‘edit_para.php?mode=edit&amp;productid=<?php echo $ProductID; ?>&amp;fieldname=str_prod_therapeutic’,’Ed’,’width=600,height=600′)” class=”btnsty” />
</th>
</tr>
<tr>
<td class=”block_content” ><?php echo $str_prod_therapeutic; ?></td>
</tr>
<tr>
<th class=”tbl_blue_bg”><a href=”javascript:NewCal(‘edatetime’,’DDMMYYYY’,true,24)”>Clinical/Pharmocological Trials</a>
<input type=”button” name=”Button32″ value=”Edit” onclick=”MM_openBrWindow(‘edit_para.php?mode=edit&amp;productid=<?php echo $ProductID; ?>&amp;fieldname=str_prod_clinical’,’Ed’,’width=600,height=600′)” class=”btnsty” />
</th>
</tr>
<tr>
<td class=”block_content” ><?php echo $str_prod_clinical; ?></td>
</tr>
<tr>
<th class=”tbl_blue_bg”><a href=”#”>Contra indications</a>
<input type=”button” name=”Button33″ value=”Edit” onclick=”MM_openBrWindow(‘edit_para.php?mode=edit&amp;productid=<?php echo $ProductID; ?>&amp;fieldname=str_prod_contraindications’,’Ed’,’width=600,height=600′)” class=”btnsty” />
</span></th>
</tr>
<tr>
<td class=”block_content” ><?php echo $str_prod_contraindications; ?></td>
</tr>
<tr>
<th class=”tbl_blue_bg”><a href=”#”>Literature</a>
<input type=”button” name=”Button34″ value=”Edit” onclick=”MM_openBrWindow(‘edit_para.php?mode=edit&amp;productid=<?php echo $ProductID; ?>&amp;fieldname=str_prod_therapeutic’,’Ed’,’width=600,height=600′)” class=”btnsty” />
</span></th>
</tr>
<tr>
<td class=”block_content” ><?php echo $str_prod_literature; ?></td>
</tr>
<tr>
<th class=”tbl_blue_bg”>
<a href=”#”>Certificate of Analysis</a>
<input type=”button” name=”Button35″ value=”Edit” onclick=”MM_openBrWindow(‘edit_para.php?mode=edit&amp;productid=<?php echo $ProductID; ?>&amp;fieldname=str_prod_certificateofanalysis’,’Ed’,’width=600,height=600′)” class=”btnsty” />
</span></th>
</tr>
<tr>
<td class=”block_content” ><?php echo $str_prod_certificateofanalysis; ?></td>
</tr>
<tr>
<th class=”tbl_blue_bg”><a href=”#”>Packaging and Dosage</a>
<input type=”button” name=”Button36″ value=”Edit” onclick=”MM_openBrWindow(‘edit_para.php?mode=edit&amp;productid=<?php echo $ProductID; ?>&amp;fieldname=str_prod_packaginganddosage’,’Ed’,’width=600,height=600′)” class=”btnsty” />
</span></th>
</tr>
<tr>
<td class=”block_content” ><?php echo $str_prod_packaginganddosage; ?></td>
</tr>
</tbody>
</table>
[/code]

It works on local machine..when i upload this to hosting server which is php 4.2..script breaks in between. what will be the reason.???

to post a comment
PHP

7 Comments(s)

Copy linkTweet thisAlerts:
@orreipJan 02.2007 — try replacing all occurences of "<?" with "<?php", see if it works.
Copy linkTweet thisAlerts:
@joshi_mangeshauthorJan 02.2007 — Thx for your reply..but that is also not working ..either it was same like earlier i chnaged to <? ..to see whether it works..anyway the script is termination in betn without any error..when we saw page view source we ddint see anythign below one of the line where php code starts..
Copy linkTweet thisAlerts:
@orreipJan 02.2007 — sometimes using '<?' is disabled, and that's why i always recommend you to use '<?php'.

As for your problem try a var_dump($str_prod_composition) just before the if statement, see what you get. I never worked with php4, but maybe you should use a string comparison instead of '!='.
Copy linkTweet thisAlerts:
@joshi_mangeshauthorJan 02.2007 — I have addedd new code..from the second $ProductID it breaks..
Copy linkTweet thisAlerts:
@orreipJan 02.2007 — [code=php]
class="btnsty" />
</a></th>
[/code]

you have an extra '</a>' here
Copy linkTweet thisAlerts:
@joshi_mangeshauthorJan 03.2007 — First of all Thx as you are taking lot efforts to help me out..now i ignored those extra </a> but till problem exist..

Now i will send you the link..

http://indoglobalsamurai.com/ighs/ighsHTML/show_productdetails.php?productid=10

just check view source..we are not showing any error but the code is also not showing...
Copy linkTweet thisAlerts:
@blulagoonJan 03.2007 — How are the variables $productid and $str_prod_description being set, are they via another script and being set by $_POST or $_GET which would work with php5 but not much earlier versions of PHP.

Blu
×

Success!

Help @joshi_mangesh spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...