Help

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
mirana
Forum Newbie
Posts: 9
Joined: Wed Dec 08, 2010 11:56 pm

Help

Post by mirana »

I'm working on this table I direct the link below.I got the source quote somewhere. I setup the sql with Max Pictures and Max Video from bigint to text collate latin1_general_ci. Even after I change it I cannot modify those Max Pictures or Max Video with any letters or Char.Then I type a letter and save it, it is automatically assigning zero instead of what ever I replaced. I'm not sure what I'm missing. I thought in the beginning the bigint initialization is the one assigning the zero. So why it is assigning even though I change it to text collate latin1_general_ci?

http://picasaweb.google.com/lh/photo/5h ... directlink

THank you for your help
mirana
Forum Newbie
Posts: 9
Joined: Wed Dec 08, 2010 11:56 pm

Re: Help

Post by mirana »

Does anyone know whats wrong?

I cannot paste the code since it has lots of coding. I'm not sure where it can be wrong :(
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Help

Post by Celauran »

It's going to be pretty tough for us to guess without seeing the code. You don't necessarily need to post all the code for the entire page, just what's relevant to this problem.
mirana
Forum Newbie
Posts: 9
Joined: Wed Dec 08, 2010 11:56 pm

Re: Help

Post by mirana »

hopefully these r the html, sql and php code.

this is the html code that define video

Code: Select all

<tr>
                                        <td class="{$warning_package_subscription_videos}">
                                            <font class="{$warning_package_subscription_videos}" id="lbl_package_subscription_videos"># Videos</font>
                                            <font class="form_field_warning">*</font>										</td>
                                        <td>:</td>
                                        <td>
                                            <input type="text" 		name="package_subscription_videos" 				value="{$cpackage_subscription_videos}"		class="{$warning_box_package_subscription_videos}"		style="width:50px"		id="box_package_subscription_videos"		onchange="change_color('box_package_subscription_videos', '#FFFFFF', 'black', 'lbl_package_subscription_videos', 'black')" />
                                            <input type="hidden" 	name="required_package_subscription_videos"		value="text" />										
                                        </td>
                                    </tr>
*****************************************************************************************************************************************************************************************************************
in sql, it is define as:

`package_subscription_videos` text collate latin1_general_ci NOT NULL,

*****************************************************************************************************************************************************************************************************************

in php
$txt_field .= "package_subscription_videos;";
------------------------------------------------------------------------------------

Code: Select all

while ($row = mysql_fetch_array($result)) {		if ($i % 2 == 1) {
			$package_subscription_bgcolor = "#e7f4fc";
		} else {
			$package_subscription_bgcolor = "#FFFFFF";
		}
                $package_subscription_videos = $row[package_subscription_videos];
          $i++;	}	mysql_close($db_connect);
	$smarty->assign("package_subscription_videos", $arr_package_subscription_videos);
Last edited by Benjamin on Thu Dec 16, 2010 1:40 pm, edited 1 time in total.
Reason: Added [syntax=php] tags.
mirana
Forum Newbie
Posts: 9
Joined: Wed Dec 08, 2010 11:56 pm

Re: Help

Post by mirana »

maybe this is the html file:

Code: Select all

 <tr>
                                            <td class="{$warning_package_listing_video}">
                                                <font class="{$warning_package_listing_video}" id="lbl_package_listing_video">Max Video </font>
                                                <font class="form_field_warning">*</font>										</td>
                                            <td>:</td>
                                            <td>
                                                <input type="text" 		name="package_listing_video" 			value="{$package_listing_video}"		class="{$warning_box_package_listing_video}"		style="width:50px"		id="box_package_listing_video"		onchange="change_color('box_package_listing_video', '#FFFFFF', 'black', 'lbl_package_listing_video', 'black')" />
                                                <input type="hidden" 	name="required_package_listing_video"	value="text" />
                                            </td>
                                        </tr>
****************************************************************************************************************************************************************************************************************
sql define:
`package_listing_video` text collate latin1_general_ci NOT NULL,
Last edited by Benjamin on Thu Dec 16, 2010 1:40 pm, edited 1 time in total.
Reason: Added [syntax=html] tags.
Post Reply