猜数字游戏php

时间:2018-03-01 08:36:31

标签: php

我正在制作一个PHP数字猜谜游戏,以便学习SESSIONS和POST / GET
我遇到的问题是数字太低而数字太高无法正常工作我在本地主机上使用xampp。

form.php的

DECLARE @provider VARCHAR(255), @cmd VARCHAR(512)
DECLARE curs CURSOR FOR
    SELECT DISTINCT Provider FROM Test.dbo.ExportProvider          

OPEN curs
FETCH NEXT FROM curs INTO @provider

WHILE @@FETCH_STATUS = 0
BEGIN
    SET @cmd = 'bcp.exe "SELECT Id, Provider, AdviserName, PolicyNumber FROM Test.dbo.ExportProvider WHERE Provider = ''' + @provider + '''" queryout "C:\Temp\' + @provider + '.csv" -c -t, -C RAW -T -S ' + @@SERVERNAME
    EXECUTE xp_cmdShell @cmd
    FETCH NEXT FROM curs INTO @provider
END

CLOSE curs 
DEALLOCATE curs

的index.php

<form class="" action="index.php" method="post">
    <p>Guesses:<input type="number" name="guess" required></p>
    <input type="submit" name="submit" value="Guess">
</form>

0 个答案:

没有答案