Dear All, (first of all I am a beginner!!!)
I have a project single-page web application (php, mysql, jquery, angularjs). I have questiong regarding angularjs and php

how to pass url parameter to php variable?

public_profile.php?user_id=7

I know basics of angularjs routing, and it works fine.
The problem is when I click on one table row, I should be taken to some kind of edit page... but I get the error saying
Notice: Undefined index: user_id in C:\xampp\htdocs\hrmodel\public\pages\onclick-dummy.php on line 2

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\hrmodel\public\pages\onclick-dummy.php on line 11

can you please help me with this? I need this urgently, until tomorrow... otherwise disregard this post...

thank youuuuu

To pass an AngularJS route URL parameter to a PHP script, follow these general steps:
In AngularJS, define a route that includes the URL parameter using $routeParams or ui-router.
Once the parameter is captured, use Angular’s $http service to send the parameter to your PHP backend.
In your PHP script, retrieve the parameter using $_GET or $_POST, depending on how the data was sent, and process it accordingly.

commented: Necromancy "visit my site" spammer +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.