-
Posts
42 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Ezio
-
Hey guys, I have a base 64 encoded data of a video and i need to save it to the server, and view it later. How do i do that...i know how to do that for images..but for videos i have no idea..any help?
-
somewhat achieved it: echo Yii::app()->user->getFlash('successmsg');echo CHtml::link('Login Here', array('site/login'));
-
How do i display a message in yii with a link using "setflash" in my controller it is: Yii::app()->user->setFlash('index','Password Reset Successful click here to login'); and in my view: echo Yii::app()->user->getFlash('index'); what i want to do is the "click here" text would be a link to the login page(site/login).. ...any ideas??
-
Thanks a lot.
-
so should that be the practice from now on, writing the ip instead of localhost..??
-
That means instead of "localhost" i should write the ip address of my database, whatever it might be..?? (so should that be the practice, writing the ip instead of localhost).
-
Yes, that worked. But isn't localhost the same as 127.0.0.1 ?
-
Hey guys, here is the problem that i am having, i am connecting to the server using these lines: $link = mysql_connect('localhost', 'username', 'password');if (!$link) { die('Not connected : ' . mysql_error());} it shows the following error: Not connected : No connection could be made because the target machine actively refused it. what am i doing wrong..??
-
will try your way and see if it works :-)
-
it does not shows an error, it just shows a blank page when i print_r the array...so there must be some error in my code... & i have removed the errors that you said still with no luck :-(
-
I did that something like this: $category_data = array();while ($row = mysql_fetch_object($category_query)) { $category_data[] = array( "category id" => $row->category_id, "category name" => $row->category; ); $sub_query = mysql_query("SELECT * FROM subcategories WHERE category_id ='".$row->category_id."';"); $num_subcategory = mysql_num_rows($sub_query); if($num_subcategory > 0){ while ($sub_row = mysql_fetch_object($sub_query) { $subcategory_id[] = $sub_row->subcategory_id; $subcategory_name[] = $sub_row->subcategory; } } then i have to take it into $category_data[ ] array..that is where i get the error..
-
yes i have that. where from i am SELECTING the values from sub-categories
-
@inglome every category has a sub category, i want the category id and then run the select query to find all the subcategories inside each categories and then save it to an array.
-
i have 3 tables in mysql categories, subcategories, values. now i want to get the values from categories table then count the number of values returned if it is greater than 0 then i fetch the category id from the categories table using while loop, next i check if the subcategory table has any data with the category id that i got from previous table if number of values is greater than 0 then i fetch the subcategory id from the subcategories table using while loop, now again i check the values table, if it has any data with subcategory id, if it is greater than 0 then i fetch all the values... my code looks something like this... $category_query = mysql_query("SELECT * FROM categories"); $num_category = mysql_num_rows($category_query); if($num_category > 0){ while ($row = mysql_fetch_object($category_query)) { $category_id[] = $row->category_id; $category_name[] = $row->category; $sub_query = mysql_query("SELECT * FROM subcategories WHERE category_id ='".$row->category_id."';"); $num_subcategory = mysql_num_rows($sub_query); if($num_subcategory > 0){ while ($sub_row = mysql_fetch_object($sub_query) { $subcategory_id[] = $sub_row->subcategory_id; $subcategory_name[] = $sub_row->subcategory; } for ($j=0; $j < $num_subcategory; $j++) { $subcategory_data[] = array("subcategory id"=> $subcategory_id[$j]); } } } for($i=0; $i<$num_category; $i++){ $category_data[] = array("category id"=>$category_id[$i], "category name"=>$category_name[$i],); } i want to get the subcategory_data[] into category_data[]...........i cannot figure this out.. :-(
-
Hey guys, I was wondering if there is a way by which i can insert the local date and time of a user anywhere around the world in my phpmyadmin using php..?? ...means suppose if a user logins from newyork, i save the local date and time of that user, and the same code would help me to save the local date and time of some other user logging from a different location, say london..How do i do that..??
-
I have saved the users subscription date and time using now() in the database and when a user logs in to his profile i subtract the current date and time from the date and time from database to check if a month has passed or not.. ..it works fine if i take a static days of 30 but what if a month has 31 days..??
-
Actually i wanted to fetch the date & time from my mysql database (I had used now() to store the date and time) and subtract it later with the current date and time to check if x number of months has passed or not.
-
I tried that and other methods too but the image that gets saved to the server allways is of 0 bytes...why is that..??
-
Hey guys, I have an image url like: https://graph.facebook.com/100001208845762/picture?type=square&return_ssl_resources=1 how do i get the image from this link and save it to my local directory..?? Please help.
-
Something like this: if($current_date_time - $date_time_from_db > 30){ echo"1 month has passed please register." }else{ echo "Carry on"; } please help.