PHP help

Networking/Security Forums -> Programming and More

Author: jemswillamLocation: london PostPosted: Thu Feb 11, 2010 1:39 pm    Post subject: PHP help
    ----
Hey can some one help me out I'm trying put this on my website but when it's in php code I get errors so can some help me out to make it work in php code

<script type="text/javascript">
$(document).ready(function() {
$("a.zoom").fancybox();

$("a.zoom1").fancybox({
'overlayOpacity' : 0.7,
'overlayColor' : '#000000'
});

$("a.zoom2").fancybox({
'zoomSpeedIn' : 500,
'zoomSpeedOut' : 500
});
});
</script>

Author: peannLocation: Ireland PostPosted: Mon Feb 15, 2010 8:43 pm    Post subject:
    ----
That's not PHP, so it naturally won't be parsed. What exactly are you trying to do?

Author: GroovicusLocation: Centerville, South Dakota PostPosted: Mon Feb 15, 2010 10:32 pm    Post subject:
    ----
Just spamming their sig.....

Author: Polina PostPosted: Thu Mar 18, 2010 5:41 pm    Post subject:
    ----
jemswillam, I had similar problem. These tutorials: http://phpforms.net/tutorial/tutorial.html helped me for decision of this problem.

Last edited by Polina on Mon Aug 29, 2011 11:29 am; edited 1 time in total

Author: jake2891 PostPosted: Wed Mar 24, 2010 9:31 pm    Post subject:
    ----
if your trying to put that exactly between the two opening and closing php tags you will have to echo the content out. otherwise close the php tag where u want to insert that code add the javascript and re open the php tag. heres an example

<?php
//content here
?>

javascript here

<?php


?>
etc.. is that what u meant?

Author: alairaustonLocation: lklkl PostPosted: Wed Jul 07, 2010 8:02 am    Post subject:
    ----
You need to put session_start() at the beginning of your code... there should be no codes before it.There should also be no white spaces after the closing tag ?>...

Moderator note: edited to remove spammy signature - capi

Author: LyricoLocation: Philippines PostPosted: Fri Aug 06, 2010 2:31 pm    Post subject:
    ----
PHP codes/tags is definitely different to javascript. But you can insert javascript code inside php codes.

for example:
<?php

echo "<script type='text/javascript'>";


echo "</script>";
?>

just make sure that every javascript line was starts with echo and inside "";

Author: proxy1gratuit PostPosted: Thu Dec 16, 2010 1:15 am    Post subject:
    ----
<?php
//code php
?>

code javascript or HTML

<?php
//code php
?>

Moderator note: edited to remove spammy signature - - capi



Networking/Security Forums -> Programming and More


output generated using printer-friendly topic mod, All times are GMT + 2 Hours

Page 1 of 1

Powered by phpBB 2.0.x © 2001 phpBB Group