Jump to content

[SOLVED] rawurlencode Doesn't Work In Textarea


inferium

Recommended Posts

Hi everyone, I've got a slight problem:

 

When I use rawurlencode as such

 

echo '<img  

src="http://dbc.eliteautoweb.com/cars/'.rawurlencode($row['cphoto']).'" style="width: 300px;" />';

 

It works on the actual outputted html, but in the textarea I have at the bottom of the page it only shows up as a space. Does anyone know of a way to fix this?

 

http://clearfrontmarketing.com/createflyer/dbc/index.php

Link to comment
Share on other sites

Ah, my bad. Here's the full code of the textarea (which is just a repeat of what's on the page).

 

<TEXTAREA ROWS="20" COLS="70" ID="textarea" READONLY="yes">
<CENTER>
<TABLE>
<TR>
<TD ALIGN="CENTER">
<A HREF="http://www.directbankcredit.com/apply/index.php"><IMG 

SRC="http://i428.photobucket.com/albums/qq2/onebigredfish/dbcbannerbadcred.gif" BORDER="0"></A>
</TD>
</TR>
<TR>
<TD>
<TABLE WIDTH="600" STYLE="border:solid 4px #000000;background-color:#f8f8f8">
<TR>
<TD>

<TABLE WIDTH="600" HEIGHT="20" BORDER="0" CELLPADDING="0">
<TR>
<TD style="color:#f0f0f0;background-color:#000000">
<FONT SIZE="5"><b>'.$row['ctitle'].'</b></FONT></TD>
</TR>
<TR>
<TD>
<FONT SIZE="4"><b>'.$row['cslogan'].'</b></FONT>

</TD>
</TR>
</TABLE>

</TD>
</TR>


<TR>
<TD>
<TABLE>
<TR>
<TD WIDTH="310" ALIGN="center">

';	
			if($row['cphoto'] == '') {
				echo '<img  src="http://dbc.eliteautoweb.com/nophoto.gif" />';
			} elseif($row['cphoto'] != '') {
				echo '<img  

src="http://dbc.eliteautoweb.com/cars/'.rawurlencode($row['cphoto']).'" style="width: 300px;" />';
			}
			echo '
</TD>
<TD VALIGN="top" WIDTH="290">
<TABLE width="100%" HEIGHT="1" 

style="background-color:#000000;color:#f0f0f0"><TR><TD><CENTER><b>Features:</b></CENTER></TD></TR></TABLE>
<table>
						<tr>
							<td style="width:  120px"><b>Make:</b></td>
							 <td><b>'.$row['cmake'].'</b></FONT></td>
						</tr>

						<tr>
							<td style="width:  120px"><b>Year:</b></td>
							 <td><b>'.$row['cyear'].'</b></FONT></td>
						</tr>

						<tr>
							<td style="width:  120px"><b>Model:</td>
							<td><b>'.$row['cmodel'].'</b></td>
						</tr>

						<tr>
							<td style="width: 120px"><b>Body  Style:</td>
							<td><b>'.$row3['btype'].'</b></td>
						</tr>

						<tr>
							<td style="width: 120px"><b>Exterior  Color:</td>
							<td><b>'.$row['cextcol'].'</b></td>
						</tr>

						<tr>
							<td style="width: 120px"><b>Interior  Color:</td>
							<td><b>'.$row['cintcol'].'</b></td>
						</tr>

						<tr>
							<td style="width: 120px; height:  

22px;"><b>Condition:</td>
							<td style="height:  

22px"><b>'.$row['ccondition'].'</b></td>
						</tr>

						<tr>
							<td style="width: 120px; height:  7px;"><b>Drive 

Type:</td>
							<td style="height:  7px"><b>'.$row4['dtype'].'</b></td>
						</tr>
					</table>

</TD>
</TR>
</TABLE>

<TD>
</TR>


<TR>
<TD>

<TABLE>
<TR>
<TD VALIGN="top">
<TABLE>
<TR>
<TD><b>Location:</TD><TD><b>'.$row['clocation'].'</b></TD>
</TR>
<TR>
<TD><b>Asking Price:<b></TD><TD><b>'.$row['cprice'].'</b></TD>
</TR>
</TABLE>
<table width="305">
<tr>
<td HEIGHT="18" ALIGN="center" style="background-color:#000000;color:#f0f0f0"><B>Contact Information:</B></td>
</tr>
<tr>
<td valign="top"  HEIGHT="100%"><B>'.$row['caddress'].'</B><br /><FONT COLOR="black"><B>Phone:  

'.$row['cphone'].'</B></FONT><br />
<br /><A HREF="http://www.directbankcredit.com/apply/index.php"><IMG 

SRC="http://i428.photobucket.com/albums/qq2/onebigredfish/dbcbannerbadcred.gif" WIDTH="300" HEIGHT="45" BORDER="0"></A>
</td>
</tr>
</table>
</TD>
<TD><table height="320" VALIGN="top" BORDER="0">
<tr>
<td HEIGHT="1" align="center" VALIGN="top" BGCOLOR="black" 

style="background-color:#000000;color:#f0f0f0"><b>Attributes:</b></FONT></td>
</tr>
<tr VALIGN="top">
<td valign="top" VALIGN="top" style="height: 292px"><b>Special Financing:</b>
	<table style="width: 100%" VALIGN="top">
	<tr>
	<td  bgcolor="#C0C0C0"><small>'.$row['cext'].'</small></td>
	</tr>
	</table>

	<table style="width: 100%">

					</table>
					<br /><b>Accessories:</span></b>
					<table style="width: 100%">
						<tr>
							<td  

bgcolor="#C0C0C0"><small>'.$row['caccess'].'</small></td>
						</tr>
					</table>
					</td>
				</tr>
			</table>

</TD>
</TR>
</TABLE>

</TD>
</TR>
</TABLE>

</TD>
</TR>
</TABLE>
</CENTER></TEXTAREA>

Link to comment
Share on other sites

Well, what I've been trying to do is make the html code copy/paste-able so that we can post the advertisements on craigslist and such. Just to save the hassle of view:source every single ad. Is there a more efficient way to achieve this effect through php?

Link to comment
Share on other sites

Sweet thanks! Also, I finally got the rawurlencode function to work. I'm not sure exactly what I did, but for some reason it seems to function just right now. I'll look into wysiwyg editors promptly though, thank you for the tip :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.