radiations3 Posted August 3, 2011 Share Posted August 3, 2011 What i need form the following mentioned code is id gets its value from $abc but its not getting the value KINDLY HELP How to do it in a right way!!! <?php $abc = $row_Recordset1['Desc']; echo "<img src = get.php?id=$abc />"; ?> Link to comment https://forums.phpfreaks.com/topic/243722-a-very-small-issue-needed-to-be-resolved/ Share on other sites More sharing options...
Pikachu2000 Posted August 3, 2011 Share Posted August 3, 2011 $row_Recordset1['Desc'] must be empty or non-existent. Where does it get its value? Link to comment https://forums.phpfreaks.com/topic/243722-a-very-small-issue-needed-to-be-resolved/#findComment-1251390 Share on other sites More sharing options...
Amit20 Posted August 3, 2011 Share Posted August 3, 2011 But are you sure you're getting the value in first $abc at line 2. try echoing it! Link to comment https://forums.phpfreaks.com/topic/243722-a-very-small-issue-needed-to-be-resolved/#findComment-1251391 Share on other sites More sharing options...
radiations3 Posted August 3, 2011 Author Share Posted August 3, 2011 yes i am getting the correct value that is 3 i check it by echo functioning on $abc Link to comment https://forums.phpfreaks.com/topic/243722-a-very-small-issue-needed-to-be-resolved/#findComment-1251393 Share on other sites More sharing options...
radiations3 Posted August 3, 2011 Author Share Posted August 3, 2011 $row_Recordset1['Desc'] must be empty or non-existent. Where does it get its value? It gets the value from the database table named as pic field name Desc and $abc is getting the correct value... Link to comment https://forums.phpfreaks.com/topic/243722-a-very-small-issue-needed-to-be-resolved/#findComment-1251394 Share on other sites More sharing options...
radiations3 Posted August 3, 2011 Author Share Posted August 3, 2011 KINDLY HELP ANYONE???? Link to comment https://forums.phpfreaks.com/topic/243722-a-very-small-issue-needed-to-be-resolved/#findComment-1251398 Share on other sites More sharing options...
Amit20 Posted August 3, 2011 Share Posted August 3, 2011 What i would recommend is write in following manner echo "<img src =get.php?id=".$abc." />"; what i have done is concatenation. But i had used in one of my code,it worked. Link to comment https://forums.phpfreaks.com/topic/243722-a-very-small-issue-needed-to-be-resolved/#findComment-1251404 Share on other sites More sharing options...
radiations3 Posted August 3, 2011 Author Share Posted August 3, 2011 Ha ha ha Solved issue myself final code here: <?php $abc = $row_Recordset1['Desc']; //echo "<img src = get.php?id=" . $row_Recordset1['Desc']. "/>"; echo "<img src='get.php?id=" . $abc . "'>" ; ?> Link to comment https://forums.phpfreaks.com/topic/243722-a-very-small-issue-needed-to-be-resolved/#findComment-1251405 Share on other sites More sharing options...
radiations3 Posted August 3, 2011 Author Share Posted August 3, 2011 What i would recommend is write in following manner echo "<img src =get.php?id=".$abc." />"; what i have done is concatenation. But i had used in one of my code,it worked. Amit thanks for your help see the correct code in my previous post.. Link to comment https://forums.phpfreaks.com/topic/243722-a-very-small-issue-needed-to-be-resolved/#findComment-1251409 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.