
Jaswinder
Members-
Posts
124 -
Joined
-
Last visited
Everything posted by Jaswinder
-
static keyword and scope resolution problem
Jaswinder replied to Jaswinder's topic in PHP Coding Help
k,, now problem solved.. thank you -
static keyword and scope resolution problem
Jaswinder replied to Jaswinder's topic in PHP Coding Help
error is that when i write that code.. dreamweaver shows than line in red color... means error.. so programs doesn't running at all -
static keyword and scope resolution problem
Jaswinder replied to Jaswinder's topic in PHP Coding Help
i am using php 5.4.7 ... but still not working static::$test :/ -
hello everyone.... what i am trying is.. i have created a simple 5 pages HTML website... and i need to add a search in it.... Is it possible without php ?? what i found is a code for google search,, which searches through web (obviously) and not in my site.... any help ??
-
i am learning static keyword.. and find this example , but it shows error ,, which i highlited below <?php class a{ static protected $test="class a"; public function static_test(){ echo static::$test; // Results class b here the program shows error .... can we use static keyword to call the variable or we have to use a class name? echo self::$test; // Results class a } } class b extends a{ static protected $test="class b"; } $obj = new b(); $obj->static_test(); ?> getting confused about these two terms.. i tell you what i understand till now about them... make me clear plz Scope resolution (::) - this is used to call constants and static variables, static functions and classes but not with instance/object ?? am i right ?? anything more about it ? static keyword - we can call static variable and functions without the need of instantiation i.e directly using scope resolution.... the class also becomes static , if any property or method declared static in it. After inheriting from such class if we override property or method we have to use static keyword again while override,,,, ok or i need to learn more ??
-
thanks for link .. it works
-
hello friends... i have uploaded the videos,, now i want to see it... i uses the <iframe> tag ,but it shows video only in firefox and also starts on page load... which i dont want,,,,, For chrome HTML5 video tag is being used... and i dont know about IE... so how should i write my code??? here is my code :- <?php while($f=mysql_fetch_array($q)) { if($f['video'] != ' ') { ?> <li> <video controls="controls" width="450" height="280"> <source src='upload/<?php echo $f["event"]; ?>/video/<?php echo $f["video"];?>' type="video/mp4" height="200" width="200"> </video></li><br /> <iframe src="upload/<?php echo $f["event"]; ?>/video/<?php echo $f["video"];?>" height="200" width="200"></iframe> <?php } } ?> How could i put condtions for browsers the chrome uses video tag and not iframe tag.., as now it shows two videos ,, but working other blank(obviously for iframe tag)... and vice-versa for firefox... and what to do for IE
-
can anyone clear me what is the difference between -> and => ?? when we call method of a class, we use $obj -> method(); can we use this also ??? $obj => method(); and also ,when we assign a value to a variable ( e.g $name ) , we us $obj->name="Smith"; but what this means ?? $obj->$name .. or is it incorrect ?? or am i assigning value of $name to $obj ?? i have seen a working code ... what it means $obj= new name; //name is a class foreach($obj as $var=>$value)
-
ok ..so this means .. i am not returning the variable in function .. thank you problem solved @ Psycho
-
hello friends i am new to oops.... what i am trying is put the value of a constant in a variable... but not getting any output code :- <?php class visible { const a='Hello'; } class check extends visible { private $c; public function c() { $this->c=self::a; } } $d=new check; echo $d->c(); ?> is it possible to inherent a constant ??
-
so you want to say .. that for each pdf file same image will repeat and there is a download link on that image for respective PDF's?????
-
Now for PDF's ... i uploaded them ... now i want to see those on frontend... how could i ??? i searched the web.. and i came accross PDF thumbnailing... should i go with that or any other options are there????
-
@jazzman1 . i found a more easy solution... while storing the filename in database.. i also inserted the events name with it... so now both events and filename get changed automatically .. it works great and i am getting images also
-
friends thanks for your replies.. but i am getting more confused .... do anyone have more simpler answer or just explain me the above answers more simply.. so that i can give it a shot..
-
Oops sorry my mistake... i used <?php echo $f['images']; ?> but no results.... it shows nothing
-
hello friends.. i have uploaded the images ,but their paths are different.. e.g upload/dancing/images/filename.jpg upload/singing/images/filename.jpg upload/fashion/images/filename.jpg i want to show all the images by clicking on a button.... How do i give path to all these..??? i am trying this code <img src="upload/../images/<?php $f['images'];?>"> here <?php $f['images'];?> is a file name coming from database but getting no result... and also the same way i want to show pdf and videos and they are also uploaded in different folders and their name are coming from database... any suggestions???
-
i want to make it work as person with same email id.. whatever he uploaded either images/pdf or videos... it should display those all of same paerson
-
<div style="width:100%; height:auto; background-color:#000; color:#FFF; text-align:center;"> <table align="center" width="100%" border="1" style="color:#FFF;"> <tr><th>Pdf</th><th>Video</th><th>Images</th></tr> <?php $email=$_GET['email']; include_once ('host.php'); $c="select * from upload where email_id=$email"; $sq=mysql_query($c) or die(mysql_error()); $r=mysql_num_rows($sq); if($r>=0) { while($f=mysql_fetch_array($sq)); {?> <tr><td><? echo $f['pdf']; ?></td><td><? echo $f['video']; ?></td><td><? echo $f['images']; ?></td></tr> <?php } } else { echo "You do not uploaded anything yet"; } ?> <tr><td colspan="3" style="background-color:#F00;"><a href="upload.php">Back</a></td></tr> </table> </div> error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@s.com' at line 1 Pdf Video Images Where email id is [email protected]
-
thanks for reply
-
Today i came across this concept MVC of PHP.. i got number of list on it.. e.g 1. Zend 2. Joomla (also a CMS) 3.Symfony 4.Drupal 5 Cake php 6 Codelgnitor 7. Twitter Bootstrap , etc and may be more... i want to know..where and what is the use of these MVC's... and which one should i learn or is in demand??
-
thank you for such info and code..... can we use the same code when we have to send the mail to the sender ...
-
its not showing that also... so i just changed the host.. its working great know and i got the email.. about <<<EOD (heredoc) what exactly it do... i search the web , not get clear much,,,i think it is used to write multiple lines with single(') and double quotes(") ?? is it and also about this line From: "$name" <$email>
-
still blank.. dont know whats happening?? shoul i try it on another hosting??
-
and 1 more question about <<<EOD (heredoc) what exactly it do... i search the web , not get clear much,,,i think it is used to write multiple lines with single(') and double quotes(") ?? is it
-
buddy same result again.. a blank page with no email in inbox