Find Jobs
Hire Freelancers

php and js Session Variable

$10-30 USD

Zaprt
Objavljeno pred približno 5 leti

$10-30 USD

Plačilo ob dostavi
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 projekta: 19054722

Več o projektu

6 ponudb
Projekt na daljavo
Aktivno pred 5 leti

Želite zaslužiti?

Prednosti oddajanja ponudb na Freelancerju

Nastavite svoj proračun in časovni okvir
Prejmite plačilo za svoje delo
Povzetek predloga
Registracija in oddajanje ponudb sta brezplačna
6 freelancerjev je oddalo ponudbo s povprečno vrednostjo $28 USD za to delo
Avatar uporabnika
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 v 1 dnevu
4,9 (131 ocen)
7,0
7,0
Avatar uporabnika
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 v 0 dnevu
4,8 (233 ocen)
7,0
7,0
Avatar uporabnika
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 v 1 dnevu
4,9 (71 ocen)
5,9
5,9
Avatar uporabnika
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 v 1 dnevu
4,5 (60 ocen)
5,6
5,6
Avatar uporabnika
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 v 1 dnevu
4,9 (32 ocen)
5,0
5,0

O stranki

Zastava UNITED STATES
Biloxi, United States
5,0
10
Plačilna metoda je verificirana
Član(ica) od nov. 2, 2015

Verifikacija stranke

Hvala! Po e-pošti smo vam poslali povezavo za prevzem brezplačnega dobropisa.
Pri pošiljanju vašega e-sporočila je šlo nekaj narobe. Poskusite znova.
Registrirani uporabniki Skupaj objavljenih del
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Nalaganje predogleda
Geolociranje je bilo dovoljeno.
Vaša prijavna seja je potekla, zato ste bili odjavljeni. Prosimo, da se znova prijavite.