Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

How to get values from href in HTML to sh

$
0
0
Hi,
This is a part of my code:

Code:


case "$1" in
home)
        echo '<h2> Select a student: </h2>'
        echo '<br>'
        for stunum in $(ls ./)
        do
            echo "<a href=edit?numeric_stu=$stunum>`sed -n 1p ./$stunum/info`</a>"
            echo '<br>'
        done
edit)
    echo '<html><body>'
    echo '<h2> Edit a student: </h2>'
    echo $_GET['numeric_stu']

Then in the case of $1 in edit, how do I get the value of numeric_stu from the href in home) ? My solution in the code doesn't work, it just prints [numeric_stu]

Viewing all articles
Browse latest Browse all 16232

Trending Articles