Find Jobs
Hire Freelancers

php and js Session Variable

$10-30 USD

Κλειστή
Αναρτήθηκε περίπου 5 χρόνια πριν

$10-30 USD

Πληρωμή κατά την παράδοση
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 :
Ταυτότητα εργασίας: 19054722

Σχετικά με την εργασία

6 προτάσεις
Απομακρυσμένη Εργασία
Ενεργός/ή 5 χρόνια πριν

Ψάχνεις τρόπο για να κερδίσεις μερικά χρήματα;

Πλεονεκτήματα πλειοδοσίας στο Freelancer

Καθόρισε τον προϋπολογισμό σου και το χρονοδιάγραμμα
Πληρώσου για τη δουλειά σου
Περίγραψε την πρόταση σου
Η εγγραφή και η πλειοδοσία σε εργασίες είναι δωρεάν
6 freelancers δίνουν μια μέση προσφορά $28 USD για αυτή τη δουλειά
Avatar Χρήστη
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 σε 1 ημέρα
4,9 (131 αξιολογήσεις)
7,0
7,0
Avatar Χρήστη
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 σε 0 ημέρα
4,8 (233 αξιολογήσεις)
7,0
7,0
Avatar Χρήστη
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 σε 1 ημέρα
4,9 (71 αξιολογήσεις)
5,9
5,9
Avatar Χρήστη
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 σε 1 ημέρα
4,5 (60 αξιολογήσεις)
5,6
5,6
Avatar Χρήστη
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 σε 1 ημέρα
4,9 (32 αξιολογήσεις)
5,0
5,0

Σχετικά με τον πελάτη

Σημαία της UNITED STATES
Biloxi, United States
5,0
10
Επαληθευμένη μέθοδος πληρωμής
Μέλος από Νοε 2, 2015

Επαλήθευση Πελάτη

Ευχαριστούμε! Σου έχουμε στείλει ένα email με ένα σύνδεσμο για να διεκδικήσεις τη δωρεάν πίστωση σου.
Κάτι πήγε στραβά κατά την προσπάθεια αποστολής του email σου. Παρακαλούμε δοκίμασε ξανά.
Εγγεγραμμένοι Χρήστες Συνολικές Αναρτημένες Δουλειές
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Φόρτωση προεπισκόπησης
Δόθηκε πρόσβαση για Geolocation.
Η σύνδεση σου έχει λήξει και τώρα έχεις αποσυνδεθεί. Παρακαλούμε συνδέσου ξανά.