• RSS
  • Twitter
  • FaceBook

Security Forums

Log in

FAQ | Search | Usergroups | Profile | Register | RSS | Posting Guidelines | Recent Posts

PHP help

Users browsing this topic:0 Security Fans, 0 Stealth Security Fans
Registered Security Fans: None
Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Programming and More

View previous topic :: View next topic  
Author Message
jemswillam
Just Arrived
Just Arrived


Joined: 04 Feb 2010
Posts: 0
Location: london

Offline

PostPosted: Thu Feb 11, 2010 1:39 pm    Post subject: PHP help Reply with quote

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>
Back to top
View user's profile Send private message Send e-mail
peann
Just Arrived
Just Arrived


Joined: 15 Feb 2010
Posts: 0
Location: Ireland

Offline

PostPosted: Mon Feb 15, 2010 8:43 pm    Post subject: Reply with quote

That's not PHP, so it naturally won't be parsed. What exactly are you trying to do?
Back to top
View user's profile Send private message
Groovicus
Trusted SF Member
Trusted SF Member


Joined: 19 May 2004
Posts: 9
Location: Centerville, South Dakota

Offline

PostPosted: Mon Feb 15, 2010 10:32 pm    Post subject: Reply with quote

Just spamming their sig.....
Back to top
View user's profile Send private message Visit poster's website
Polina
Just Arrived
Just Arrived


Joined: 17 Mar 2010
Posts: 0


Offline

PostPosted: Thu Mar 18, 2010 5:41 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
jake2891
Just Arrived
Just Arrived


Joined: 20 Mar 2010
Posts: 0


Offline

PostPosted: Wed Mar 24, 2010 9:31 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
alairauston
Just Arrived
Just Arrived


Joined: 03 Jul 2010
Posts: 0
Location: lklkl

Offline

PostPosted: Wed Jul 07, 2010 8:02 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Lyrico
Just Arrived
Just Arrived


Joined: 02 Aug 2010
Posts: 0
Location: Philippines

Offline

PostPosted: Fri Aug 06, 2010 2:31 pm    Post subject: Reply with quote

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 "";
Back to top
View user's profile Send private message Visit poster's website
proxy1gratuit
Just Arrived
Just Arrived


Joined: 16 Dec 2010
Posts: 0


Offline

PostPosted: Thu Dec 16, 2010 1:15 am    Post subject: Reply with quote

<?php
//code php
?>

code javascript or HTML

<?php
//code php
?>

Moderator note: edited to remove spammy signature - - capi
Back to top
View user's profile Send private message
Display posts from previous:   

Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Programming and More All times are GMT + 2 Hours
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Community Area

Log in | Register