Find Jobs
Hire Freelancers

php and js Session Variable

$10-30 USD

Cerrado
Publicado hace alrededor de 5 años

$10-30 USD

Pagado a la entrega
Simple project for those who know php to js.. THIS WORKS .................... var parameters = { serveraddress: '[login to view URL]', // Manual manipulation works username: 'testuser', // Manual manipulation works password: '00e2ac36b356df4616b6ecb6', // Manual manipulation works loglevel: 5 }; THIS Fails ....................I need this to be dynamic and get the username from the php session variable... var parameters = { var sesstest = "<?php echo $_SESSION['username']; ?>"; // This is a Session variable -- I can see username and echo it in php. serveraddress: '[login to view URL]', username: sesstest, // This fails. If I place it in single quotes = fail. Double quotes = fail. And + var + fails. password: '00e2ac36b356df4616b6ecb6', loglevel: 5 }; In my php I have: <script type="text/javascript"> var sesstest='<?php echo $_SESSION['username'];?>'; </script> before the scrip source of the js loads. How do I get session variables into js and what is the proper format for js colon :
ID del proyecto: 19054722

Información sobre el proyecto

6 propuestas
Proyecto remoto
Activo hace 5 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
6 freelancers están ofertando un promedio de $28 USD por este trabajo
Avatar del usuario
Nice to meet you. I've read the project description and can develop definitely. I'll provide you with the highly skilled & professional HTML/CSS, PHP/WordPress/CodeIgniter, JavaScript, MySQL, front & back-end web development services and complete the site in time. Please contact with me. Thank you very much.
$25 USD en 1 día
4,9 (131 comentarios)
7,0
7,0
Avatar del usuario
Hello, I'm Abu Gosia. I'm interesting your project very well. I m quite well experienced in these jobs. Let's go ahead with me. Thanks
$15 USD en 0 día
4,8 (233 comentarios)
7,0
7,0
Avatar del usuario
Hello I'm the full stack developer. I understood all about your job. so there is no problem for me to complete your project with my skill. I can do work your job perfectly. Hope to work with you as soon as possible. Best regards
$25 USD en 1 día
4,9 (71 comentarios)
5,9
5,9
Avatar del usuario
Good I will solve the problem from now in here. you have saved the username as session variable. you can enter the session variable into <input type="hidden"... value="..."> That's all. You can get the username in javascript using "hidden" above.
$20 USD en 1 día
4,5 (60 comentarios)
5,6
5,6
Avatar del usuario
Hello Sir, I have gone through your requirements and will be able to fix your issue asap. I have 5+ years of experience in PHP and all it's supportive languages like JS, HTML, CSS, Bootstrap etc. Let discuss on chat for more details.. Thanks
$20 USD en 1 día
4,9 (32 comentarios)
5,0
5,0

Sobre este cliente

Bandera de UNITED STATES
Biloxi, United States
5,0
10
Forma de pago verificada
Miembro desde nov 2, 2015

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.